home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1996-07-14 | 16.5 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: ICHelperWhat.p
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| ZX81 Sinclair BASIC (image/sinclairBASIC)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Applause Picture (image/applausePicture)
| ext
| Unsupported |
1%
| dexvert
| bsdiff patch (other/bsdiffPatch)
| ext
| Unsupported |
1%
| dexvert
| imgdiff patch (other/imgdiffPatch)
| ext
| Unsupported |
1%
| dexvert
| MATLAB p-code (other/matlabPCode)
| ext
| Unsupported |
1%
| dexvert
| WSUS Patch Storage File (other/wsusPatchStorageFile)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Sun Jul 14 13:48:12 1996, modified Sun Jul 14 13:48:12 1996, creator 'CWIE', type ASCII, 16192 bytes "ICHelperWhat.p" , at 0x3fc0 456 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 49 43 48 65 6c 70 | 65 72 57 68 61 74 2e 70 |..ICHelp|erWhat.p|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 3f 40 00 | 00 01 c8 ae 0e e3 5c ae |.....?@.|......\.|
|00000060| 0e e3 5c 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..\.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 52 07 00 00 |........|....R...|
|00000080| 75 6e 69 74 20 49 43 48 | 65 6c 70 65 72 57 68 61 |unit ICH|elperWha|
|00000090| 74 3b 0d 0d 69 6e 74 65 | 72 66 61 63 65 0d 0d 09 |t;..inte|rface...|
|000000a0| 75 73 65 73 0d 09 09 49 | 43 57 69 6e 64 6f 77 47 |uses...I|CWindowG|
|000000b0| 6c 6f 62 61 6c 73 3b 0d | 0d 09 66 75 6e 63 74 69 |lobals;.|..functi|
|000000c0| 6f 6e 20 57 68 61 74 4f | 70 65 6e 48 65 6c 70 65 |on WhatO|penHelpe|
|000000d0| 72 20 28 77 74 3a 20 57 | 69 6e 64 6f 77 54 79 70 |r (wt: W|indowTyp|
|000000e0| 65 3b 20 69 74 65 6d 3a | 20 69 6e 74 65 67 65 72 |e; item:| integer|
|000000f0| 29 3a 20 4f 53 45 72 72 | 3b 0d 09 66 75 6e 63 74 |): OSErr|;..funct|
|00000100| 69 6f 6e 20 57 68 61 74 | 41 63 74 69 76 61 74 65 |ion What|Activate|
|00000110| 48 65 6c 70 65 72 20 28 | 77 74 3a 20 57 69 6e 64 |Helper (|wt: Wind|
|00000120| 6f 77 54 79 70 65 3b 20 | 69 74 65 6d 3a 20 69 6e |owType; |item: in|
|00000130| 74 65 67 65 72 3b 20 61 | 63 74 69 76 61 74 65 3a |teger; a|ctivate:|
|00000140| 20 62 6f 6f 6c 65 61 6e | 29 3a 20 4f 53 45 72 72 | boolean|): OSErr|
|00000150| 3b 0d 09 66 75 6e 63 74 | 69 6f 6e 20 57 68 61 74 |;..funct|ion What|
|00000160| 46 6c 75 73 68 48 65 6c | 70 65 72 20 28 77 74 3a |FlushHel|per (wt:|
|00000170| 20 57 69 6e 64 6f 77 54 | 79 70 65 3b 20 69 74 65 | WindowT|ype; ite|
|00000180| 6d 3a 20 69 6e 74 65 67 | 65 72 29 3a 20 4f 53 45 |m: integ|er): OSE|
|00000190| 72 72 3b 0d 09 66 75 6e | 63 74 69 6f 6e 20 57 68 |rr;..fun|ction Wh|
|000001a0| 61 74 43 6c 6f 73 65 48 | 65 6c 70 65 72 20 28 77 |atCloseH|elper (w|
|000001b0| 74 3a 20 57 69 6e 64 6f | 77 54 79 70 65 3b 20 69 |t: Windo|wType; i|
|000001c0| 74 65 6d 3a 20 69 6e 74 | 65 67 65 72 29 3a 20 4f |tem: int|eger): O|
|000001d0| 53 45 72 72 3b 0d 09 66 | 75 6e 63 74 69 6f 6e 20 |SErr;..f|unction |
|000001e0| 57 68 61 74 43 6c 69 63 | 6b 48 65 6c 70 65 72 20 |WhatClic|kHelper |
|000001f0| 28 77 74 3a 20 57 69 6e | 64 6f 77 54 79 70 65 3b |(wt: Win|dowType;|
|00000200| 20 69 74 65 6d 3a 20 69 | 6e 74 65 67 65 72 3b 20 | item: i|nteger; |
|00000210| 65 72 3a 20 65 76 65 6e | 74 52 65 63 6f 72 64 29 |er: even|tRecord)|
|00000220| 3a 20 4f 53 45 72 72 3b | 0d 09 66 75 6e 63 74 69 |: OSErr;|..functi|
|00000230| 6f 6e 20 57 68 61 74 4b | 65 79 48 65 6c 70 65 72 |on WhatK|eyHelper|
|00000240| 20 28 77 74 3a 20 57 69 | 6e 64 6f 77 54 79 70 65 | (wt: Wi|ndowType|
|00000250| 3b 20 69 74 65 6d 3a 20 | 69 6e 74 65 67 65 72 3b |; item: |integer;|
|00000260| 20 65 72 3a 20 45 76 65 | 6e 74 52 65 63 6f 72 64 | er: Eve|ntRecord|
|00000270| 29 3a 20 4f 53 45 72 72 | 3b 0d 09 66 75 6e 63 74 |): OSErr|;..funct|
|00000280| 69 6f 6e 20 57 68 61 74 | 43 75 72 73 6f 72 48 65 |ion What|CursorHe|
|00000290| 6c 70 65 72 20 28 77 74 | 3a 20 57 69 6e 64 6f 77 |lper (wt|: Window|
|000002a0| 54 79 70 65 3b 20 69 74 | 65 6d 3a 20 69 6e 74 65 |Type; it|em: inte|
|000002b0| 67 65 72 3b 20 70 74 3a | 20 50 6f 69 6e 74 3b 20 |ger; pt:| Point; |
|000002c0| 63 75 72 73 6f 72 69 64 | 3a 20 69 6e 74 65 67 65 |cursorid|: intege|
|000002d0| 72 29 3a 20 4f 53 45 72 | 72 3b 0d 0d 09 70 72 6f |r): OSEr|r;...pro|
|000002e0| 63 65 64 75 72 65 20 48 | 65 6c 70 65 72 53 65 74 |cedure H|elperSet|
|000002f0| 53 65 6c 65 63 74 69 6f | 6e 28 6b 65 79 3a 53 74 |Selectio|n(key:St|
|00000300| 72 32 35 35 29 3b 0d 0d | 69 6d 70 6c 65 6d 65 6e |r255);..|implemen|
|00000310| 74 61 74 69 6f 6e 0d 0d | 09 75 73 65 73 0d 09 09 |tation..|.uses...|
|00000320| 49 63 6f 6e 73 2c 20 44 | 69 61 6c 6f 67 73 2c 20 |Icons, D|ialogs, |
|00000330| 4c 69 73 74 73 2c 20 46 | 6f 6e 74 73 2c 20 54 6f |Lists, F|onts, To|
|00000340| 6f 6c 55 74 69 6c 73 2c | 20 45 72 72 6f 72 73 2c |olUtils,| Errors,|
|00000350| 20 49 43 53 74 72 48 2c | 20 0d 0d 09 09 49 43 54 | ICStrH,| ....ICT|
|00000360| 79 70 65 73 2c 20 49 43 | 4b 65 79 73 2c 20 49 43 |ypes, IC|Keys, IC|
|00000370| 41 50 49 2c 20 49 43 53 | 75 62 73 2c 20 49 43 44 |API, ICS|ubs, ICD|
|00000380| 69 61 6c 6f 67 73 2c 20 | 49 43 4d 69 73 63 53 75 |ialogs, |ICMiscSu|
|00000390| 62 73 2c 20 49 43 44 6f | 63 75 6d 65 6e 74 20 7b |bs, ICDo|cument {|
|000003a0| 58 7d 2c 20 49 43 47 6c | 6f 62 61 6c 73 2c 20 7b |X}, ICGl|obals, {|
|000003b0| 7d 0d 09 09 49 43 49 43 | 6f 6e 53 75 69 74 65 73 |}...ICIC|onSuites|
|000003c0| 2c 20 49 43 53 74 61 6e | 64 61 72 64 46 69 6c 65 |, ICStan|dardFile|
|000003d0| 2c 20 49 43 4d 6f 76 61 | 62 6c 65 4d 6f 64 61 6c |, ICMova|bleModal|
|000003e0| 2c 20 49 43 57 69 6e 64 | 6f 77 73 3b 0d 0d 09 63 |, ICWind|ows;...c|
|000003f0| 6f 6e 73 74 0d 09 09 64 | 69 74 43 68 61 6e 67 65 |onst...d|itChange|
|00000400| 20 3d 20 31 3b 0d 09 09 | 64 69 74 4d 61 69 6e 55 | = 1;...|ditMainU|
|00000410| 73 65 72 49 74 65 6d 20 | 3d 20 32 3b 0d 09 09 64 |serItem |= 2;...d|
|00000420| 69 74 41 64 64 20 3d 20 | 33 3b 0d 09 09 64 69 74 |itAdd = |3;...dit|
|00000430| 44 65 6c 65 74 65 20 3d | 20 34 3b 0d 09 09 64 69 |Delete =| 4;...di|
|00000440| 74 4c 69 73 74 20 3d 20 | 35 3b 0d 0d 09 63 6f 6e |tList = |5;...con|
|00000450| 73 74 0d 09 09 64 69 74 | 4f 4b 20 3d 20 31 3b 0d |st...dit|OK = 1;.|
|00000460| 09 09 64 69 74 43 61 6e | 63 65 6c 20 3d 20 32 3b |..ditCan|cel = 2;|
|00000470| 0d 09 09 64 69 74 41 64 | 64 55 73 65 72 49 74 65 |...ditAd|dUserIte|
|00000480| 6d 20 3d 20 33 3b 0d 09 | 09 64 69 74 48 65 6c 70 |m = 3;..|.ditHelp|
|00000490| 65 72 20 3d 20 34 3b 0d | 09 09 64 69 74 41 70 70 |er = 4;.|..ditApp|
|000004a0| 4e 61 6d 65 20 3d 20 35 | 3b 0d 09 09 64 69 74 43 |Name = 5|;...ditC|
|000004b0| 68 6f 6f 73 65 41 70 70 | 6c 69 63 61 74 69 6f 6e |hooseApp|lication|
|000004c0| 20 3d 20 36 3b 0d 0d 09 | 63 6f 6e 73 74 0d 09 09 | = 6;...|const...|
|000004d0| 6b 43 65 6c 6c 48 65 69 | 67 68 74 20 3d 20 33 36 |kCellHei|ght = 36|
|000004e0| 3b 0d 0d 09 74 79 70 65 | 0d 09 09 49 6e 74 65 72 |;...type|...Inter|
|000004f0| 6e 61 6c 41 70 70 53 70 | 65 63 20 3d 20 72 65 63 |nalAppSp|ec = rec|
|00000500| 6f 72 64 0d 09 09 09 09 | 6b 65 79 3a 20 53 74 72 |ord.....|key: Str|
|00000510| 32 35 35 3b 0d 09 09 09 | 09 6c 6f 63 6b 65 64 3a |255;....|.locked:|
|00000520| 20 62 6f 6f 6c 65 61 6e | 3b 0d 09 09 09 09 61 70 | boolean|;.....ap|
|00000530| 70 73 70 65 63 3a 20 49 | 43 41 70 70 53 70 65 63 |pspec: I|CAppSpec|
|00000540| 3b 0d 09 09 09 65 6e 64 | 3b 0d 0d 09 70 72 6f 63 |;....end|;...proc|
|00000550| 65 64 75 72 65 20 47 65 | 74 4e 74 68 45 6c 65 6d |edure Ge|tNthElem|
|00000560| 65 6e 74 20 28 65 6e 74 | 72 69 65 73 3a 20 48 61 |ent (ent|ries: Ha|
|00000570| 6e 64 6c 65 3b 20 69 6e | 64 65 78 3a 20 69 6e 74 |ndle; in|dex: int|
|00000580| 65 67 65 72 3b 20 76 61 | 72 20 72 65 73 3a 20 49 |eger; va|r res: I|
|00000590| 6e 74 65 72 6e 61 6c 41 | 70 70 53 70 65 63 29 3b |nternalA|ppSpec);|
|000005a0| 0d 09 62 65 67 69 6e 0d | 09 09 42 6c 6f 63 6b 4d |..begin.|..BlockM|
|000005b0| 6f 76 65 28 50 74 72 28 | 6c 6f 6e 67 69 6e 74 28 |ove(Ptr(|longint(|
|000005c0| 65 6e 74 72 69 65 73 5e | 29 20 2b 20 28 69 6e 64 |entries^|) + (ind|
|000005d0| 65 78 20 2d 20 31 29 20 | 2a 20 73 69 7a 65 6f 66 |ex - 1) |* sizeof|
|000005e0| 28 49 6e 74 65 72 6e 61 | 6c 41 70 70 53 70 65 63 |(Interna|lAppSpec|
|000005f0| 29 29 2c 20 40 72 65 73 | 2c 20 73 69 7a 65 6f 66 |)), @res|, sizeof|
|00000600| 28 49 6e 74 65 72 6e 61 | 6c 41 70 70 53 70 65 63 |(Interna|lAppSpec|
|00000610| 29 29 3b 0d 09 65 6e 64 | 3b 20 28 2a 20 47 65 74 |));..end|; (* Get|
|00000620| 4e 74 68 45 6c 65 6d 65 | 6e 74 20 2a 29 0d 0d 09 |NthEleme|nt *)...|
|00000630| 70 72 6f 63 65 64 75 72 | 65 20 53 65 74 4e 74 68 |procedur|e SetNth|
|00000640| 45 6c 65 6d 65 6e 74 20 | 28 65 6e 74 72 69 65 73 |Element |(entries|
|00000650| 3a 20 48 61 6e 64 6c 65 | 3b 20 69 6e 64 65 78 3a |: Handle|; index:|
|00000660| 20 69 6e 74 65 67 65 72 | 3b 20 76 61 72 20 72 65 | integer|; var re|
|00000670| 73 3a 20 49 6e 74 65 72 | 6e 61 6c 41 70 70 53 70 |s: Inter|nalAppSp|
|00000680| 65 63 29 3b 0d 09 62 65 | 67 69 6e 0d 09 09 42 6c |ec);..be|gin...Bl|
|00000690| 6f 63 6b 4d 6f 76 65 28 | 40 72 65 73 2c 20 50 74 |ockMove(|@res, Pt|
|000006a0| 72 28 6c 6f 6e 67 69 6e | 74 28 65 6e 74 72 69 65 |r(longin|t(entrie|
|000006b0| 73 5e 29 20 2b 20 28 69 | 6e 64 65 78 20 2d 20 31 |s^) + (i|ndex - 1|
|000006c0| 29 20 2a 20 73 69 7a 65 | 6f 66 28 49 6e 74 65 72 |) * size|of(Inter|
|000006d0| 6e 61 6c 41 70 70 53 70 | 65 63 29 29 2c 20 73 69 |nalAppSp|ec)), si|
|000006e0| 7a 65 6f 66 28 49 6e 74 | 65 72 6e 61 6c 41 70 70 |zeof(Int|ernalApp|
|000006f0| 53 70 65 63 29 29 3b 0d | 09 65 6e 64 3b 20 28 2a |Spec));.|.end; (*|
|00000700| 20 53 65 74 4e 74 68 45 | 6c 65 6d 65 6e 74 20 2a | SetNthE|lement *|
|00000710| 29 0d 0d 09 66 75 6e 63 | 74 69 6f 6e 20 45 6e 74 |)...func|tion Ent|
|00000720| 72 79 4c 6f 63 6b 65 64 | 20 28 65 6e 74 72 69 65 |ryLocked| (entrie|
|00000730| 73 3a 20 48 61 6e 64 6c | 65 3b 20 69 6e 64 65 78 |s: Handl|e; index|
|00000740| 3a 20 69 6e 74 65 67 65 | 72 29 3a 20 62 6f 6f 6c |: intege|r): bool|
|00000750| 65 61 6e 3b 0d 09 09 76 | 61 72 0d 09 09 09 61 70 |ean;...v|ar....ap|
|00000760| 70 73 70 65 63 3a 20 49 | 6e 74 65 72 6e 61 6c 41 |pspec: I|nternalA|
|00000770| 70 70 53 70 65 63 3b 0d | 09 62 65 67 69 6e 0d 09 |ppSpec;.|.begin..|
|00000780| 09 47 65 74 4e 74 68 45 | 6c 65 6d 65 6e 74 28 65 |.GetNthE|lement(e|
|00000790| 6e 74 72 69 65 73 2c 20 | 69 6e 64 65 78 2c 20 61 |ntries, |index, a|
|000007a0| 70 70 73 70 65 63 29 3b | 0d 09 09 45 6e 74 72 79 |ppspec);|...Entry|
|000007b0| 4c 6f 63 6b 65 64 20 3a | 3d 20 61 70 70 73 70 65 |Locked :|= appspe|
|000007c0| 63 2e 6c 6f 63 6b 65 64 | 3b 0d 09 65 6e 64 3b 20 |c.locked|;..end; |
|000007d0| 28 2a 20 45 6e 74 72 79 | 4c 6f 63 6b 65 64 20 2a |(* Entry|Locked *|
|000007e0| 29 0d 0d 09 70 72 6f 63 | 65 64 75 72 65 20 44 69 |)...proc|edure Di|
|000007f0| 6d 42 75 74 74 6f 6e 73 | 20 28 77 74 3a 20 57 69 |mButtons| (wt: Wi|
|00000800| 6e 64 6f 77 54 79 70 65 | 29 3b 0d 09 09 76 61 72 |ndowType|);...var|
|00000810| 0d 09 09 09 68 61 76 65 | 5f 73 65 6c 65 63 74 69 |....have|_selecti|
|00000820| 6f 6e 3a 20 62 6f 6f 6c | 65 61 6e 3b 0d 09 09 09 |on: bool|ean;....|
|00000830| 64 6c 67 3a 20 44 69 61 | 6c 6f 67 50 74 72 3b 0d |dlg: Dia|logPtr;.|
|00000840| 09 09 09 73 65 6c 65 63 | 74 69 6f 6e 3a 20 69 6e |...selec|tion: in|
|00000850| 74 65 67 65 72 3b 0d 09 | 09 09 65 6e 74 72 69 65 |teger;..|..entrie|
|00000860| 73 3a 20 48 61 6e 64 6c | 65 3b 0d 09 09 09 6c 68 |s: Handl|e;....lh|
|00000870| 3a 20 4c 69 73 74 48 61 | 6e 64 6c 65 3b 0d 09 62 |: ListHa|ndle;..b|
|00000880| 65 67 69 6e 0d 09 09 64 | 6c 67 20 3a 3d 20 77 69 |egin...d|lg := wi|
|00000890| 6e 64 6f 77 69 6e 66 6f | 5b 77 74 5d 2e 77 69 6e |ndowinfo|[wt].win|
|000008a0| 64 6f 77 3b 0d 09 09 6c | 68 20 3a 3d 20 4c 69 73 |dow;...l|h := Lis|
|000008b0| 74 48 61 6e 64 6c 65 28 | 77 69 6e 64 6f 77 69 6e |tHandle(|windowin|
|000008c0| 66 6f 5b 77 74 5d 2e 69 | 74 65 6d 73 5b 64 69 74 |fo[wt].i|tems[dit|
|000008d0| 4c 69 73 74 5d 5e 2e 73 | 70 61 72 65 5f 64 61 74 |List]^.s|pare_dat|
|000008e0| 61 29 3b 0d 09 09 65 6e | 74 72 69 65 73 20 3a 3d |a);...en|tries :=|
|000008f0| 20 48 61 6e 64 6c 65 28 | 77 69 6e 64 6f 77 69 6e | Handle(|windowin|
|00000900| 66 6f 5b 77 74 5d 2e 69 | 74 65 6d 73 5b 64 69 74 |fo[wt].i|tems[dit|
|00000910| 4c 69 73 74 5d 5e 2e 64 | 61 74 61 29 3b 0d 09 09 |List]^.d|ata);...|
|00000920| 73 65 6c 65 63 74 69 6f | 6e 20 3a 3d 20 53 65 6c |selectio|n := Sel|
|00000930| 65 63 74 65 64 4c 69 6e | 65 28 6c 68 29 3b 0d 09 |ectedLin|e(lh);..|
|00000940| 09 68 61 76 65 5f 73 65 | 6c 65 63 74 69 6f 6e 20 |.have_se|lection |
|00000950| 3a 3d 20 28 73 65 6c 65 | 63 74 69 6f 6e 20 3c 3e |:= (sele|ction <>|
|00000960| 20 2d 31 29 3b 0d 09 09 | 53 65 74 44 43 74 6c 45 | -1);...|SetDCtlE|
|00000970| 6e 61 62 6c 65 28 64 6c | 67 2c 20 64 69 74 41 64 |nable(dl|g, ditAd|
|00000980| 64 2c 20 6e 6f 74 20 49 | 73 44 6f 63 4c 6f 63 6b |d, not I|sDocLock|
|00000990| 65 64 29 3b 0d 09 09 53 | 65 74 44 43 74 6c 45 6e |ed);...S|etDCtlEn|
|000009a0| 61 62 6c 65 28 64 6c 67 | 2c 20 64 69 74 44 65 6c |able(dlg|, ditDel|
|000009b0| 65 74 65 2c 20 68 61 76 | 65 5f 73 65 6c 65 63 74 |ete, hav|e_select|
|000009c0| 69 6f 6e 20 61 6e 64 20 | 6e 6f 74 20 45 6e 74 72 |ion and |not Entr|
|000009d0| 79 4c 6f 63 6b 65 64 28 | 65 6e 74 72 69 65 73 2c |yLocked(|entries,|
|000009e0| 20 73 65 6c 65 63 74 69 | 6f 6e 20 2b 20 31 29 29 | selecti|on + 1))|
|000009f0| 3b 0d 09 09 53 65 74 44 | 43 74 6c 45 6e 61 62 6c |;...SetD|CtlEnabl|
|00000a00| 65 28 64 6c 67 2c 20 64 | 69 74 43 68 61 6e 67 65 |e(dlg, d|itChange|
|00000a10| 2c 20 68 61 76 65 5f 73 | 65 6c 65 63 74 69 6f 6e |, have_s|election|
|00000a20| 20 61 6e 64 20 6e 6f 74 | 20 45 6e 74 72 79 4c 6f | and not| EntryLo|
|00000a30| 63 6b 65 64 28 65 6e 74 | 72 69 65 73 2c 20 73 65 |cked(ent|ries, se|
|00000a40| 6c 65 63 74 69 6f 6e 20 | 2b 20 31 29 29 3b 0d 09 |lection |+ 1));..|
|00000a50| 09 4f 75 74 6c 69 6e 65 | 44 65 66 61 75 6c 74 31 |.Outline|Default1|
|00000a60| 28 64 6c 67 2c 20 64 69 | 74 4d 61 69 6e 55 73 65 |(dlg, di|tMainUse|
|00000a70| 72 49 74 65 6d 29 3b 0d | 09 65 6e 64 3b 20 28 2a |rItem);.|.end; (*|
|00000a80| 20 44 69 6d 42 75 74 74 | 6f 6e 73 20 2a 29 0d 0d | DimButt|ons *)..|
|00000a90| 09 70 72 6f 63 65 64 75 | 72 65 20 55 73 65 72 49 |.procedu|re UserI|
|00000aa0| 74 65 6d 55 70 64 61 74 | 65 20 28 64 6c 67 3a 20 |temUpdat|e (dlg: |
|00000ab0| 44 69 61 6c 6f 67 50 74 | 72 3b 20 69 74 65 6d 3a |DialogPt|r; item:|
|00000ac0| 20 69 6e 74 65 67 65 72 | 29 3b 0d 09 09 76 61 72 | integer|);...var|
|00000ad0| 0d 09 09 09 6c 69 73 74 | 5f 72 65 63 74 3a 20 52 |....list|_rect: R|
|00000ae0| 65 63 74 3b 0d 09 62 65 | 67 69 6e 0d 09 09 47 65 |ect;..be|gin...Ge|
|00000af0| 74 44 49 74 65 6d 52 65 | 63 74 28 64 6c 67 2c 20 |tDItemRe|ct(dlg, |
|00000b00| 69 74 65 6d 2c 20 6c 69 | 73 74 5f 72 65 63 74 29 |item, li|st_rect)|
|00000b10| 3b 0d 09 09 50 65 6e 4e | 6f 72 6d 61 6c 3b 0d 09 |;...PenN|ormal;..|
|00000b20| 09 49 6e 73 65 74 52 65 | 63 74 28 6c 69 73 74 5f |.InsetRe|ct(list_|
|00000b30| 72 65 63 74 2c 20 2d 31 | 2c 20 2d 31 29 3b 0d 09 |rect, -1|, -1);..|
|00000b40| 09 46 72 61 6d 65 52 65 | 63 74 28 6c 69 73 74 5f |.FrameRe|ct(list_|
|00000b50| 72 65 63 74 29 3b 0d 09 | 09 4c 55 70 64 61 74 65 |rect);..|.LUpdate|
|00000b60| 28 64 6c 67 5e 2e 76 69 | 73 52 67 6e 2c 20 4c 69 |(dlg^.vi|sRgn, Li|
|00000b70| 73 74 48 61 6e 64 6c 65 | 28 77 69 6e 64 6f 77 69 |stHandle|(windowi|
|00000b80| 6e 66 6f 5b 47 65 74 57 | 69 6e 64 6f 77 54 79 70 |nfo[GetW|indowTyp|
|00000b90| 65 28 64 6c 67 29 5d 2e | 69 74 65 6d 73 5b 69 74 |e(dlg)].|items[it|
|00000ba0| 65 6d 5d 5e 2e 73 70 61 | 72 65 5f 64 61 74 61 29 |em]^.spa|re_data)|
|00000bb0| 29 3b 0d 09 65 6e 64 3b | 20 28 2a 20 55 73 65 72 |);..end;| (* User|
|00000bc0| 49 74 65 6d 55 70 64 61 | 74 65 20 2a 29 0d 0d 09 |ItemUpda|te *)...|
|00000bd0| 70 72 6f 63 65 64 75 72 | 65 20 4d 79 4c 44 45 46 |procedur|e MyLDEF|
|00000be0| 20 28 6d 65 73 73 61 67 | 65 3a 20 69 6e 74 65 67 | (messag|e: integ|
|00000bf0| 65 72 3b 20 73 65 6c 65 | 63 74 3a 20 62 6f 6f 6c |er; sele|ct: bool|
|00000c00| 65 61 6e 3b 20 76 61 72 | 20 72 3a 20 52 65 63 74 |ean; var| r: Rect|
|00000c10| 3b 20 74 68 65 5f 63 65 | 6c 6c 3a 20 43 65 6c 6c |; the_ce|ll: Cell|
|00000c20| 3b 20 6f 66 66 73 65 74 | 3a 20 69 6e 74 65 67 65 |; offset|: intege|
|00000c30| 72 3b 20 64 61 74 61 6c | 65 6e 3a 20 69 6e 74 65 |r; datal|en: inte|
|00000c40| 67 65 72 3b 20 6c 68 3a | 20 4c 69 73 74 48 61 6e |ger; lh:| ListHan|
|00000c50| 64 6c 65 29 3b 0d 09 09 | 76 61 72 0d 09 09 09 65 |dle);...|var....e|
|00000c60| 6e 74 72 69 65 73 3a 20 | 48 61 6e 64 6c 65 3b 0d |ntries: |Handle;.|
|00000c70| 0d 09 09 70 72 6f 63 65 | 64 75 72 65 20 4c 44 44 |...proce|dure LDD|
|00000c80| 72 61 77 3b 0d 09 09 09 | 63 6f 6e 73 74 0d 09 09 |raw;....|const...|
|00000c90| 09 09 48 69 6c 69 74 65 | 4d 6f 64 65 20 3d 20 24 |..Hilite|Mode = $|
|00000ca0| 39 33 38 3b 0d 09 09 09 | 76 61 72 0d 09 09 09 09 |938;....|var.....|
|00000cb0| 61 70 70 73 70 65 63 3a | 20 49 6e 74 65 72 6e 61 |appspec:| Interna|
|00000cc0| 6c 41 70 70 53 70 65 63 | 3b 0d 09 09 09 09 65 72 |lAppSpec|;.....er|
|00000cd0| 72 3a 20 4f 53 45 72 72 | 3b 0d 09 09 09 09 73 75 |r: OSErr|;.....su|
|00000ce0| 69 74 65 3a 20 48 61 6e | 64 6c 65 3b 0d 09 09 09 |ite: Han|dle;....|
|00000cf0| 09 63 75 72 5f 78 3a 20 | 69 6e 74 65 67 65 72 3b |.cur_x: |integer;|
|00000d00| 0d 09 09 09 09 6a 75 6e | 6b 3a 20 4f 53 45 72 72 |.....jun|k: OSErr|
|00000d10| 3b 0d 09 09 09 09 74 6d | 70 72 65 63 74 3a 20 52 |;.....tm|prect: R|
|00000d20| 65 63 74 3b 0d 09 09 09 | 09 73 79 73 5f 66 6f 6e |ect;....|.sys_fon|
|00000d30| 74 5f 69 6e 66 6f 3a 20 | 46 6f 6e 74 49 6e 66 6f |t_info: |FontInfo|
|00000d40| 3b 0d 09 09 09 09 74 6f | 70 3a 20 69 6e 74 65 67 |;.....to|p: integ|
|00000d50| 65 72 3b 0d 09 09 09 09 | 74 72 61 6e 73 66 65 72 |er;.....|transfer|
|00000d60| 3a 20 69 6e 74 65 67 65 | 72 3b 0d 09 09 09 09 72 |: intege|r;.....r|
|00000d70| 67 6e 3a 20 52 67 6e 48 | 61 6e 64 6c 65 3b 0d 09 |gn: RgnH|andle;..|
|00000d80| 09 09 09 72 67 6e 32 3a | 20 52 67 6e 48 61 6e 64 |...rgn2:| RgnHand|
|00000d90| 6c 65 3b 0d 09 09 62 65 | 67 69 6e 0d 09 09 09 69 |le;...be|gin....i|
|00000da0| 66 20 64 61 74 61 6c 65 | 6e 20 3d 20 30 20 74 68 |f datale|n = 0 th|
|00000db0| 65 6e 20 62 65 67 69 6e | 0d 09 09 09 09 47 65 74 |en begin|.....Get|
|00000dc0| 4e 74 68 45 6c 65 6d 65 | 6e 74 28 65 6e 74 72 69 |NthEleme|nt(entri|
|00000dd0| 65 73 2c 20 74 68 65 5f | 63 65 6c 6c 2e 76 20 2b |es, the_|cell.v +|
|00000de0| 20 31 2c 20 61 70 70 73 | 70 65 63 29 3b 0d 09 09 | 1, apps|pec);...|
|00000df0| 09 09 45 72 61 73 65 52 | 65 63 74 28 72 29 3b 0d |..EraseR|ect(r);.|
|00000e00| 09 09 09 09 63 75 72 5f | 78 20 3a 3d 20 30 3b 0d |....cur_|x := 0;.|
|00000e10| 09 09 09 09 72 67 6e 20 | 3a 3d 20 4e 65 77 52 67 |....rgn |:= NewRg|
|00000e20| 6e 3b 0d 09 09 09 09 69 | 66 20 73 79 73 74 65 6d |n;.....i|f system|
|00000e30| 37 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 09 09 09 |7 then b|egin....|
|00000e40| 09 09 74 6d 70 72 65 63 | 74 20 3a 3d 20 72 3b 0d |..tmprec|t := r;.|
|00000e50| 09 09 09 09 09 74 6d 70 | 72 65 63 74 2e 62 6f 74 |.....tmp|rect.bot|
|00000e60| 74 6f 6d 20 3a 3d 20 74 | 6d 70 72 65 63 74 2e 74 |tom := t|mprect.t|
|00000e70| 6f 70 20 2b 20 33 32 3b | 0d 09 09 09 09 09 74 6d |op + 32;|......tm|
|00000e80| 70 72 65 63 74 2e 72 69 | 67 68 74 20 3a 3d 20 74 |prect.ri|ght := t|
|00000e90| 6d 70 72 65 63 74 2e 6c | 65 66 74 20 2b 20 33 32 |mprect.l|eft + 32|
|00000ea0| 3b 0d 09 09 09 09 09 4f | 66 66 73 65 74 52 65 63 |;......O|ffsetRec|
|00000eb0| 74 28 74 6d 70 72 65 63 | 74 2c 20 28 6b 43 65 6c |t(tmprec|t, (kCel|
|00000ec0| 6c 48 65 69 67 68 74 20 | 2d 20 33 32 29 20 64 69 |lHeight |- 32) di|
|00000ed0| 76 20 32 2c 20 28 6b 43 | 65 6c 6c 48 65 69 67 68 |v 2, (kC|ellHeigh|
|00000ee0| 74 20 2d 20 33 32 29 20 | 64 69 76 20 32 29 3b 0d |t - 32) |div 2);.|
|00000ef0| 09 09 09 09 09 6a 75 6e | 6b 20 3a 3d 20 47 65 74 |.....jun|k := Get|
|00000f00| 44 54 44 42 49 63 6f 6e | 53 75 69 74 65 43 61 63 |DTDBIcon|SuiteCac|
|00000f10| 68 65 64 28 27 41 50 50 | 4c 27 2c 20 61 70 70 73 |hed('APP|L', apps|
|00000f20| 70 65 63 2e 61 70 70 73 | 70 65 63 2e 66 43 72 65 |pec.apps|pec.fCre|
|00000f30| 61 74 6f 72 2c 20 73 75 | 69 74 65 29 3b 0d 09 09 |ator, su|ite);...|
|00000f40| 09 09 09 69 66 20 73 75 | 69 74 65 20 3c 3e 20 6e |...if su|ite <> n|
|00000f50| 69 6c 20 74 68 65 6e 20 | 62 65 67 69 6e 0d 09 09 |il then |begin...|
|00000f60| 09 09 09 09 69 66 20 73 | 65 6c 65 63 74 20 74 68 |....if s|elect th|
|00000f70| 65 6e 20 62 65 67 69 6e | 0d 09 09 09 09 09 09 09 |en begin|........|
|00000f80| 74 72 61 6e 73 66 65 72 | 20 3a 3d 20 74 74 53 65 |transfer| := ttSe|
|00000f90| 6c 65 63 74 65 64 3b 0d | 09 09 09 09 09 09 65 6e |lected;.|......en|
|00000fa0| 64 20 65 6c 73 65 20 62 | 65 67 69 6e 0d 09 09 09 |d else b|egin....|
|00000fb0| 09 09 09 09 74 72 61 6e | 73 66 65 72 20 3a 3d 20 |....tran|sfer := |
|00000fc0| 74 74 4e 6f 6e 65 3b 0d | 09 09 09 09 09 09 65 6e |ttNone;.|......en|
|00000fd0| 64 3b 20 28 2a 20 69 66 | 20 2a 29 0d 09 09 09 09 |d; (* if| *).....|
|00000fe0| 09 09 65 72 72 20 3a 3d | 20 50 6c 6f 74 49 63 6f |..err :=| PlotIco|
|00000ff0| 6e 53 75 69 74 65 28 74 | 6d 70 72 65 63 74 2c 20 |nSuite(t|mprect, |
|00001000| 61 74 4e 6f 6e 65 2c 20 | 74 72 61 6e 73 66 65 72 |atNone, |transfer|
|00001010| 2c 20 73 75 69 74 65 29 | 3b 0d 09 09 09 09 09 09 |, suite)|;.......|
|00001020| 6a 75 6e 6b 20 3a 3d 20 | 49 63 6f 6e 53 75 69 74 |junk := |IconSuit|
|00001030| 65 54 6f 52 67 6e 28 72 | 67 6e 2c 20 74 6d 70 72 |eToRgn(r|gn, tmpr|
|00001040| 65 63 74 2c 20 61 74 4e | 6f 6e 65 2c 20 73 75 69 |ect, atN|one, sui|
|00001050| 74 65 29 3b 0d 09 09 09 | 09 09 65 6e 64 3b 20 28 |te);....|..end; (|
|00001060| 2a 20 69 66 20 2a 29 0d | 09 09 09 09 09 63 75 72 |* if *).|.....cur|
|00001070| 5f 78 20 3a 3d 20 63 75 | 72 5f 78 20 2b 20 6b 43 |_x := cu|r_x + kC|
|00001080| 65 6c 6c 48 65 69 67 68 | 74 3b 0d 09 09 09 09 65 |ellHeigh|t;.....e|
|00001090| 6e 64 3b 0d 09 09 09 09 | 63 75 72 5f 78 20 3a 3d |nd;.....|cur_x :=|
|000010a0| 20 63 75 72 5f 78 20 2b | 20 32 3b 0d 0d 09 09 09 | cur_x +| 2;.....|
|000010b0| 09 54 65 78 74 46 6f 6e | 74 28 73 79 73 74 65 6d |.TextFon|t(system|
|000010c0| 46 6f 6e 74 29 3b 0d 09 | 09 09 09 47 65 74 46 6f |Font);..|...GetFo|
|000010d0| 6e 74 49 6e 66 6f 28 73 | 79 73 5f 66 6f 6e 74 5f |ntInfo(s|ys_font_|
|000010e0| 69 6e 66 6f 29 3b 0d 0d | 09 09 09 09 74 6f 70 20 |info);..|....top |
|000010f0| 3a 3d 20 28 6b 43 65 6c | 6c 48 65 69 67 68 74 20 |:= (kCel|lHeight |
|00001100| 2d 20 28 73 79 73 5f 66 | 6f 6e 74 5f 69 6e 66 6f |- (sys_f|ont_info|
|00001110| 2e 61 73 63 65 6e 74 20 | 2b 20 73 79 73 5f 66 6f |.ascent |+ sys_fo|
|00001120| 6e 74 5f 69 6e 66 6f 2e | 64 65 73 63 65 6e 74 29 |nt_info.|descent)|
|00001130| 29 20 64 69 76 20 32 3b | 0d 09 09 09 09 54 65 78 |) div 2;|.....Tex|
|00001140| 74 46 6f 6e 74 28 73 79 | 73 74 65 6d 46 6f 6e 74 |tFont(sy|stemFont|
|00001150| 29 3b 0d 09 09 09 09 4d | 6f 76 65 54 6f 28 72 2e |);.....M|oveTo(r.|
|00001160| 6c 65 66 74 20 2b 20 63 | 75 72 5f 78 2c 20 72 2e |left + c|ur_x, r.|
|00001170| 74 6f 70 20 2b 20 74 6f | 70 20 2b 20 73 79 73 5f |top + to|p + sys_|
|00001180| 66 6f 6e 74 5f 69 6e 66 | 6f 2e 61 73 63 65 6e 74 |font_inf|o.ascent|
|00001190| 29 3b 0d 09 09 09 09 44 | 72 61 77 53 74 72 69 6e |);.....D|rawStrin|
|000011a0| 67 28 63 6f 6e 63 61 74 | 28 54 50 43 6f 70 79 28 |g(concat|(TPCopy(|
|000011b0| 61 70 70 73 70 65 63 2e | 6b 65 79 2c 20 6c 65 6e |appspec.|key, len|
|000011c0| 67 74 68 28 6b 49 43 48 | 65 6c 70 65 72 29 20 2b |gth(kICH|elper) +|
|000011d0| 20 31 2c 20 32 35 35 29 | 2c 20 47 65 74 41 53 74 | 1, 255)|, GetASt|
|000011e0| 72 69 6e 67 28 31 32 38 | 2c 20 35 29 2c 20 61 70 |ring(128|, 5), ap|
|000011f0| 70 73 70 65 63 2e 61 70 | 70 73 70 65 63 2e 6e 61 |pspec.ap|pspec.na|
|00001200| 6d 65 29 29 3b 0d 0d 09 | 09 09 09 69 66 20 73 65 |me));...|...if se|
|00001210| 6c 65 63 74 20 74 68 65 | 6e 20 62 65 67 69 6e 0d |lect the|n begin.|
|00001220| 09 09 09 09 09 72 67 6e | 32 20 3a 3d 20 4e 65 77 |.....rgn|2 := New|
|00001230| 52 67 6e 3b 0d 09 09 09 | 09 09 52 65 63 74 52 67 |Rgn;....|..RectRg|
|00001240| 6e 28 72 67 6e 32 2c 20 | 72 29 3b 0d 09 09 09 09 |n(rgn2, |r);.....|
|00001250| 09 69 66 20 68 61 73 5f | 63 6f 6c 6f 72 51 44 20 |.if has_|colorQD |
|00001260| 74 68 65 6e 20 62 65 67 | 69 6e 0d 09 09 09 09 09 |then beg|in......|
|00001270| 09 42 69 74 43 6c 72 28 | 50 74 72 28 48 69 6c 69 |.BitClr(|Ptr(Hili|
|00001280| 74 65 4d 6f 64 65 29 2c | 20 70 48 69 6c 69 74 65 |teMode),| pHilite|
|00001290| 42 69 74 29 3b 0d 09 09 | 09 09 09 65 6e 64 3b 20 |Bit);...|...end; |
|000012a0| 28 2a 20 69 66 20 2a 29 | 0d 09 09 09 09 09 58 6f |(* if *)|......Xo|
|000012b0| 72 52 67 6e 28 72 67 6e | 2c 20 72 67 6e 32 2c 20 |rRgn(rgn|, rgn2, |
|000012c0| 72 67 6e 32 29 3b 0d 09 | 09 09 09 09 49 6e 76 65 |rgn2);..|....Inve|
|000012d0| 72 74 52 67 6e 28 72 67 | 6e 32 29 3b 0d 09 09 09 |rtRgn(rg|n2);....|
|000012e0| 09 09 44 69 73 70 6f 73 | 65 52 67 6e 28 72 67 6e |..Dispos|eRgn(rgn|
|000012f0| 32 29 3b 0d 09 09 09 09 | 65 6e 64 3b 20 28 2a 20 |2);.....|end; (* |
|00001300| 69 66 20 2a 29 0d 09 09 | 09 09 69 66 20 72 67 6e |if *)...|..if rgn|
|00001310| 20 3c 3e 20 6e 69 6c 20 | 74 68 65 6e 20 62 65 67 | <> nil |then beg|
|00001320| 69 6e 0d 09 09 09 09 09 | 44 69 73 70 6f 73 65 52 |in......|DisposeR|
|00001330| 67 6e 28 72 67 6e 29 3b | 0d 09 09 09 09 65 6e 64 |gn(rgn);|.....end|
|00001340| 3b 20 28 2a 20 69 66 20 | 2a 29 0d 09 09 09 65 6e |; (* if |*)....en|
|00001350| 64 3b 20 28 2a 20 69 66 | 20 2a 29 0d 09 09 65 6e |d; (* if| *)...en|
|00001360| 64 3b 0d 0d 09 62 65 67 | 69 6e 0d 09 09 6f 66 66 |d;...beg|in...off|
|00001370| 73 65 74 20 3a 3d 20 6f | 66 66 73 65 74 3b 20 7b |set := o|ffset; {|
|00001380| 20 55 6e 75 73 65 64 20 | 7d 0d 09 09 53 65 74 50 | Unused |}...SetP|
|00001390| 6f 72 74 28 6c 68 5e 5e | 2e 70 6f 72 74 29 3b 0d |ort(lh^^|.port);.|
|000013a0| 09 09 65 6e 74 72 69 65 | 73 20 3a 3d 20 48 61 6e |..entrie|s := Han|
|000013b0| 64 6c 65 28 77 69 6e 64 | 6f 77 69 6e 66 6f 5b 47 |dle(wind|owinfo[G|
|000013c0| 65 74 57 69 6e 64 6f 77 | 54 79 70 65 28 6c 68 5e |etWindow|Type(lh^|
|000013d0| 5e 2e 70 6f 72 74 29 5d | 2e 69 74 65 6d 73 5b 64 |^.port)]|.items[d|
|000013e0| 69 74 4c 69 73 74 5d 5e | 2e 64 61 74 61 29 3b 0d |itList]^|.data);.|
|000013f0| 09 09 63 61 73 65 20 6d | 65 73 73 61 67 65 20 6f |..case m|essage o|
|00001400| 66 0d 09 09 09 6c 49 6e | 69 74 4d 73 67 3a 20 0d |f....lIn|itMsg: .|
|00001410| 09 09 09 09 3b 0d 09 09 | 09 6c 44 72 61 77 4d 73 |....;...|.lDrawMs|
|00001420| 67 3a 20 0d 09 09 09 09 | 4c 44 44 72 61 77 3b 0d |g: .....|LDDraw;.|
|00001430| 09 09 09 6c 48 69 6c 69 | 74 65 4d 73 67 3a 20 0d |...lHili|teMsg: .|
|00001440| 09 09 09 09 4c 44 44 72 | 61 77 3b 0d 09 09 09 6c |....LDDr|aw;....l|
|00001450| 43 6c 6f 73 65 4d 73 67 | 3a 20 0d 09 09 09 09 3b |CloseMsg|: .....;|
|00001460| 0d 09 09 09 6f 74 68 65 | 72 77 69 73 65 0d 09 09 |....othe|rwise...|
|00001470| 09 09 3b 0d 09 09 65 6e | 64 3b 0d 09 65 6e 64 3b |..;...en|d;..end;|
|00001480| 20 28 2a 20 4d 79 4c 44 | 45 46 20 2a 29 0d 0d 09 | (* MyLD|EF *)...|
|00001490| 66 75 6e 63 74 69 6f 6e | 20 57 68 61 74 4f 70 65 |function| WhatOpe|
|000014a0| 6e 48 65 6c 70 65 72 20 | 28 77 74 3a 20 57 69 6e |nHelper |(wt: Win|
|000014b0| 64 6f 77 54 79 70 65 3b | 20 69 74 65 6d 3a 20 69 |dowType;| item: i|
|000014c0| 6e 74 65 67 65 72 29 3a | 20 4f 53 45 72 72 3b 0d |nteger):| OSErr;.|
|000014d0| 09 09 76 61 72 0d 09 09 | 09 64 6c 67 3a 20 44 69 |..var...|.dlg: Di|
|000014e0| 61 6c 6f 67 50 74 72 3b | 0d 09 09 09 65 6e 74 72 |alogPtr;|....entr|
|000014f0| 69 65 73 3a 20 48 61 6e | 64 6c 65 3b 0d 09 09 09 |ies: Han|dle;....|
|00001500| 61 74 74 72 3a 20 6c 6f | 6e 67 69 6e 74 3b 0d 09 |attr: lo|ngint;..|
|00001510| 09 09 65 72 72 3a 20 4f | 53 45 72 72 3b 0d 09 09 |..err: O|SErr;...|
|00001520| 09 63 6f 75 6e 74 3a 20 | 6c 6f 6e 67 69 6e 74 3b |.count: |longint;|
|00001530| 0d 09 09 09 6c 69 73 74 | 5f 72 65 63 74 3a 20 52 |....list|_rect: R|
|00001540| 65 63 74 3b 0d 09 09 09 | 64 61 74 61 5f 72 65 63 |ect;....|data_rec|
|00001550| 74 3a 20 52 65 63 74 3b | 0d 09 09 09 63 65 6c 6c |t: Rect;|....cell|
|00001560| 5f 73 69 7a 65 3a 20 50 | 6f 69 6e 74 3b 0d 09 09 |_size: P|oint;...|
|00001570| 09 6c 68 3a 20 4c 69 73 | 74 48 61 6e 64 6c 65 3b |.lh: Lis|tHandle;|
|00001580| 0d 09 09 09 74 6d 70 61 | 70 73 70 65 63 3a 20 49 |....tmpa|pspec: I|
|00001590| 6e 74 65 72 6e 61 6c 41 | 70 70 53 70 65 63 3b 0d |nternalA|ppSpec;.|
|000015a0| 09 09 09 6e 64 78 3a 20 | 6c 6f 6e 67 69 6e 74 3b |...ndx: |longint;|
|000015b0| 0d 09 09 09 73 69 7a 65 | 3a 20 6c 6f 6e 67 69 6e |....size|: longin|
|000015c0| 74 3b 0d 09 62 65 67 69 | 6e 0d 09 09 65 72 72 20 |t;..begi|n...err |
|000015d0| 3a 3d 20 6e 6f 45 72 72 | 3b 0d 09 09 77 69 6e 64 |:= noErr|;...wind|
|000015e0| 6f 77 69 6e 66 6f 5b 77 | 74 5d 2e 69 74 65 6d 73 |owinfo[w|t].items|
|000015f0| 5b 69 74 65 6d 5d 5e 2e | 73 70 61 72 65 5f 64 61 |[item]^.|spare_da|
|00001600| 74 61 20 3a 3d 20 6e 69 | 6c 3b 0d 09 09 77 69 6e |ta := ni|l;...win|
|00001610| 64 6f 77 69 6e 66 6f 5b | 77 74 5d 2e 69 74 65 6d |dowinfo[|wt].item|
|00001620| 73 5b 69 74 65 6d 5d 5e | 2e 64 61 74 61 20 3a 3d |s[item]^|.data :=|
|00001630| 20 6e 69 6c 3b 0d 09 09 | 64 6c 67 20 3a 3d 20 77 | nil;...|dlg := w|
|00001640| 69 6e 64 6f 77 69 6e 66 | 6f 5b 77 74 5d 2e 77 69 |indowinf|o[wt].wi|
|00001650| 6e 64 6f 77 3b 0d 09 09 | 53 65 74 44 49 74 65 6d |ndow;...|SetDItem|
|00001660| 48 61 6e 64 6c 65 28 64 | 6c 67 2c 20 69 74 65 6d |Handle(d|lg, item|
|00001670| 2c 20 40 55 73 65 72 49 | 74 65 6d 55 70 64 61 74 |, @UserI|temUpdat|
|00001680| 65 29 3b 0d 09 09 65 6e | 74 72 69 65 73 20 3a 3d |e);...en|tries :=|
|00001690| 20 4e 65 77 48 61 6e 64 | 6c 65 28 30 29 3b 0d 09 | NewHand|le(0);..|
|000016a0| 09 69 66 20 65 6e 74 72 | 69 65 73 20 3d 20 6e 69 |.if entr|ies = ni|
|000016b0| 6c 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 09 09 09 |l then b|egin....|
|000016c0| 65 72 72 20 3a 3d 20 6d | 65 6d 46 75 6c 6c 45 72 |err := m|emFullEr|
|000016d0| 72 3b 0d 09 09 65 6e 64 | 3b 20 28 2a 20 69 66 20 |r;...end|; (* if |
|000016e0| 2a 29 0d 09 09 69 66 20 | 65 72 72 20 3d 20 6e 6f |*)...if |err = no|
|000016f0| 45 72 72 20 74 68 65 6e | 20 62 65 67 69 6e 0d 09 |Err then| begin..|
|00001700| 09 09 6e 64 78 20 3a 3d | 20 31 3b 0d 09 09 09 72 |..ndx :=| 1;....r|
|00001710| 65 70 65 61 74 0d 09 09 | 09 09 65 72 72 20 3a 3d |epeat...|..err :=|
|00001720| 20 49 43 4d 61 70 45 72 | 72 28 49 43 47 65 74 49 | ICMapEr|r(ICGetI|
|00001730| 6e 64 50 72 65 66 28 47 | 65 74 49 6e 73 74 61 6e |ndPref(G|etInstan|
|00001740| 63 65 2c 20 6e 64 78 2c | 20 74 6d 70 61 70 73 70 |ce, ndx,| tmpapsp|
|00001750| 65 63 2e 6b 65 79 29 29 | 3b 0d 09 09 09 09 69 66 |ec.key))|;.....if|
|00001760| 20 65 72 72 20 3d 20 6e | 6f 45 72 72 20 74 68 65 | err = n|oErr the|
|00001770| 6e 20 62 65 67 69 6e 0d | 09 09 09 09 09 69 66 20 |n begin.|.....if |
|00001780| 49 55 45 71 75 61 6c 53 | 74 72 69 6e 67 28 54 50 |IUEqualS|tring(TP|
|00001790| 43 6f 70 79 28 74 6d 70 | 61 70 73 70 65 63 2e 6b |Copy(tmp|apspec.k|
|000017a0| 65 79 2c 20 31 2c 20 6c | 65 6e 67 74 68 28 6b 49 |ey, 1, l|ength(kI|
|000017b0| 43 48 65 6c 70 65 72 29 | 29 2c 20 6b 49 43 48 65 |CHelper)|), kICHe|
|000017c0| 6c 70 65 72 29 20 3d 20 | 30 20 74 68 65 6e 20 62 |lper) = |0 then b|
|000017d0| 65 67 69 6e 0d 09 09 09 | 09 09 09 73 69 7a 65 20 |egin....|...size |
|000017e0| 3a 3d 20 73 69 7a 65 6f | 66 28 74 6d 70 61 70 73 |:= sizeo|f(tmpaps|
|000017f0| 70 65 63 2e 61 70 70 73 | 70 65 63 29 3b 0d 09 09 |pec.apps|pec);...|
|00001800| 09 09 09 09 65 72 72 20 | 3a 3d 20 49 43 4d 61 70 |....err |:= ICMap|
|00001810| 45 72 72 28 49 43 47 65 | 74 50 72 65 66 28 47 65 |Err(ICGe|tPref(Ge|
|00001820| 74 49 6e 73 74 61 6e 63 | 65 2c 20 74 6d 70 61 70 |tInstanc|e, tmpap|
|00001830| 73 70 65 63 2e 6b 65 79 | 2c 20 61 74 74 72 2c 20 |spec.key|, attr, |
|00001840| 40 74 6d 70 61 70 73 70 | 65 63 2e 61 70 70 73 70 |@tmpapsp|ec.appsp|
|00001850| 65 63 2c 20 73 69 7a 65 | 29 29 3b 0d 09 09 09 09 |ec, size|));.....|
|00001860| 09 09 69 66 20 65 72 72 | 20 3d 20 6e 6f 45 72 72 |..if err| = noErr|
|00001870| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 09 09 09 09 | then be|gin.....|
|00001880| 09 09 09 74 6d 70 61 70 | 73 70 65 63 2e 6c 6f 63 |...tmpap|spec.loc|
|00001890| 6b 65 64 20 3a 3d 20 54 | 50 62 74 73 74 28 61 74 |ked := T|Pbtst(at|
|000018a0| 74 72 2c 20 49 43 61 74 | 74 72 5f 6c 6f 63 6b 65 |tr, ICat|tr_locke|
|000018b0| 64 5f 62 69 74 29 20 7c | 20 49 73 44 6f 63 4c 6f |d_bit) || IsDocLo|
|000018c0| 63 6b 65 64 3b 0d 09 09 | 09 09 09 09 09 65 72 72 |cked;...|.....err|
|000018d0| 20 3a 3d 20 50 74 72 41 | 6e 64 48 61 6e 64 28 40 | := PtrA|ndHand(@|
|000018e0| 74 6d 70 61 70 73 70 65 | 63 2c 20 65 6e 74 72 69 |tmpapspe|c, entri|
|000018f0| 65 73 2c 20 73 69 7a 65 | 6f 66 28 49 6e 74 65 72 |es, size|of(Inter|
|00001900| 6e 61 6c 41 70 70 53 70 | 65 63 29 29 3b 0d 09 09 |nalAppSp|ec));...|
|00001910| 09 09 09 09 65 6e 64 3b | 20 28 2a 20 69 66 20 2a |....end;| (* if *|
|00001920| 29 0d 09 09 09 09 09 65 | 6e 64 3b 20 28 2a 20 69 |)......e|nd; (* i|
|00001930| 66 20 2a 29 0d 09 09 09 | 09 65 6e 64 3b 20 28 2a |f *)....|.end; (*|
|00001940| 20 69 66 20 2a 29 0d 09 | 09 09 09 6e 64 78 20 3a | if *)..|...ndx :|
|00001950| 3d 20 6e 64 78 20 2b 20 | 31 3b 0d 09 09 09 75 6e |= ndx + |1;....un|
|00001960| 74 69 6c 20 65 72 72 20 | 3c 3e 20 6e 6f 45 72 72 |til err |<> noErr|
|00001970| 3b 0d 09 09 65 6e 64 3b | 20 28 2a 20 69 66 20 2a |;...end;| (* if *|
|00001980| 29 0d 09 09 69 66 20 65 | 72 72 20 3d 20 69 63 50 |)...if e|rr = icP|
|00001990| 72 65 66 4e 6f 74 46 6f | 75 6e 64 45 72 72 20 74 |refNotFo|undErr t|
|000019a0| 68 65 6e 20 62 65 67 69 | 6e 0d 09 09 09 65 72 72 |hen begi|n....err|
|000019b0| 20 3a 3d 20 6e 6f 45 72 | 72 3b 0d 09 09 65 6e 64 | := noEr|r;...end|
|000019c0| 3b 20 28 2a 20 69 66 20 | 2a 29 0d 09 09 69 66 20 |; (* if |*)...if |
|000019d0| 65 72 72 20 3d 20 6e 6f | 45 72 72 20 74 68 65 6e |err = no|Err then|
|000019e0| 20 62 65 67 69 6e 0d 09 | 09 09 63 6f 75 6e 74 20 | begin..|..count |
|000019f0| 3a 3d 20 47 65 74 48 61 | 6e 64 6c 65 53 69 7a 65 |:= GetHa|ndleSize|
|00001a00| 28 65 6e 74 72 69 65 73 | 29 20 64 69 76 20 73 69 |(entries|) div si|
|00001a10| 7a 65 6f 66 28 49 6e 74 | 65 72 6e 61 6c 41 70 70 |zeof(Int|ernalApp|
|00001a20| 53 70 65 63 29 3b 0d 09 | 09 09 77 69 6e 64 6f 77 |Spec);..|..window|
|00001a30| 69 6e 66 6f 5b 77 74 5d | 2e 69 74 65 6d 73 5b 69 |info[wt]|.items[i|
|00001a40| 74 65 6d 5d 5e 2e 64 61 | 74 61 20 3a 3d 20 50 74 |tem]^.da|ta := Pt|
|00001a50| 72 28 65 6e 74 72 69 65 | 73 29 3b 0d 09 09 09 47 |r(entrie|s);....G|
|00001a60| 65 74 44 49 74 65 6d 52 | 65 63 74 28 64 6c 67 2c |etDItemR|ect(dlg,|
|00001a70| 20 69 74 65 6d 2c 20 6c | 69 73 74 5f 72 65 63 74 | item, l|ist_rect|
|00001a80| 29 3b 0d 09 09 09 6c 69 | 73 74 5f 72 65 63 74 2e |);....li|st_rect.|
|00001a90| 72 69 67 68 74 20 3a 3d | 20 6c 69 73 74 5f 72 65 |right :=| list_re|
|00001aa0| 63 74 2e 72 69 67 68 74 | 20 2d 20 31 35 3b 0d 09 |ct.right| - 15;..|
|00001ab0| 09 09 53 65 74 52 65 63 | 74 28 64 61 74 61 5f 72 |..SetRec|t(data_r|
|00001ac0| 65 63 74 2c 20 30 2c 20 | 30 2c 20 31 2c 20 63 6f |ect, 0, |0, 1, co|
|00001ad0| 75 6e 74 29 3b 0d 09 09 | 09 53 65 74 50 74 28 63 |unt);...|.SetPt(c|
|00001ae0| 65 6c 6c 5f 73 69 7a 65 | 2c 20 6c 69 73 74 5f 72 |ell_size|, list_r|
|00001af0| 65 63 74 2e 72 69 67 68 | 74 20 2d 20 6c 69 73 74 |ect.righ|t - list|
|00001b00| 5f 72 65 63 74 2e 6c 65 | 66 74 2c 20 6b 43 65 6c |_rect.le|ft, kCel|
|00001b10| 6c 48 65 69 67 68 74 29 | 3b 0d 09 09 09 6c 68 20 |lHeight)|;....lh |
|00001b20| 3a 3d 20 4c 4e 65 77 28 | 6c 69 73 74 5f 72 65 63 |:= LNew(|list_rec|
|00001b30| 74 2c 20 64 61 74 61 5f | 72 65 63 74 2c 20 63 65 |t, data_|rect, ce|
|00001b40| 6c 6c 5f 73 69 7a 65 2c | 20 31 32 38 2c 20 64 6c |ll_size,| 128, dl|
|00001b50| 67 2c 20 74 72 75 65 2c | 20 66 61 6c 73 65 2c 20 |g, true,| false, |
|00001b60| 66 61 6c 73 65 2c 20 74 | 72 75 65 29 3b 0d 09 09 |false, t|rue);...|
|00001b70| 09 69 66 20 6c 68 20 3d | 20 6e 69 6c 20 74 68 65 |.if lh =| nil the|
|00001b80| 6e 20 62 65 67 69 6e 0d | 09 09 09 09 65 72 72 20 |n begin.|....err |
|00001b90| 3a 3d 20 6d 65 6d 46 75 | 6c 6c 45 72 72 3b 0d 09 |:= memFu|llErr;..|
|00001ba0| 09 09 65 6e 64 3b 20 28 | 2a 20 69 66 20 2a 29 0d |..end; (|* if *).|
|00001bb0| 09 09 65 6e 64 3b 20 28 | 2a 20 69 66 20 2a 29 0d |..end; (|* if *).|
|00001bc0| 09 09 69 66 20 65 72 72 | 20 3d 20 6e 6f 45 72 72 |..if err| = noErr|
|00001bd0| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 09 09 09 6c | then be|gin....l|
|00001be0| 68 5e 5e 2e 72 65 66 43 | 6f 6e 20 3a 3d 20 6f 72 |h^^.refC|on := or|
|00001bf0| 64 28 40 4d 79 4c 44 45 | 46 29 3b 0d 09 09 09 6c |d(@MyLDE|F);....l|
|00001c00| 68 5e 5e 2e 73 65 6c 46 | 6c 61 67 73 20 3a 3d 20 |h^^.selF|lags := |
|00001c10| 6c 4f 6e 6c 79 4f 6e 65 | 3b 0d 09 09 09 77 69 6e |lOnlyOne|;....win|
|00001c20| 64 6f 77 69 6e 66 6f 5b | 77 74 5d 2e 69 74 65 6d |dowinfo[|wt].item|
|00001c30| 73 5b 69 74 65 6d 5d 5e | 2e 73 70 61 72 65 5f 64 |s[item]^|.spare_d|
|00001c40| 61 74 61 20 3a 3d 20 50 | 74 72 28 6c 68 29 3b 0d |ata := P|tr(lh);.|
|00001c50| 09 09 09 44 69 6d 42 75 | 74 74 6f 6e 73 28 77 74 |...DimBu|ttons(wt|
|00001c60| 29 3b 0d 09 09 09 53 65 | 74 55 70 44 65 66 61 75 |);....Se|tUpDefau|
|00001c70| 6c 74 4f 75 74 6c 69 6e | 65 28 64 6c 67 2c 20 64 |ltOutlin|e(dlg, d|
|00001c80| 69 74 43 68 61 6e 67 65 | 2c 20 64 69 74 4d 61 69 |itChange|, ditMai|
|00001c90| 6e 55 73 65 72 49 74 65 | 6d 29 3b 0d 09 09 09 77 |nUserIte|m);....w|
|00001ca0| 69 6e 64 6f 77 69 6e 66 | 6f 5b 77 74 5d 2e 73 65 |indowinf|o[wt].se|
|00001cb0| 6c 65 63 74 65 64 5f 69 | 74 65 6d 20 3a 3d 20 64 |lected_i|tem := d|
|00001cc0| 69 74 4c 69 73 74 3b 0d | 09 09 65 6e 64 3b 20 28 |itList;.|..end; (|
|00001cd0| 2a 20 69 66 20 2a 29 0d | 09 09 57 68 61 74 4f 70 |* if *).|..WhatOp|
|00001ce0| 65 6e 48 65 6c 70 65 72 | 20 3a 3d 20 65 72 72 3b |enHelper| := err;|
|00001cf0| 0d 09 65 6e 64 3b 20 28 | 2a 20 57 68 61 74 4f 70 |..end; (|* WhatOp|
|00001d00| 65 6e 48 65 6c 70 65 72 | 20 2a 29 0d 0d 09 66 75 |enHelper| *)...fu|
|00001d10| 6e 63 74 69 6f 6e 20 43 | 68 6f 6f 73 65 41 70 70 |nction C|hooseApp|
|00001d20| 6c 69 63 61 74 69 6f 6e | 20 28 76 61 72 20 73 70 |lication| (var sp|
|00001d30| 65 63 3a 20 49 43 41 70 | 70 53 70 65 63 29 3a 20 |ec: ICAp|pSpec): |
|00001d40| 62 6f 6f 6c 65 61 6e 3b | 0d 09 09 76 61 72 0d 09 |boolean;|...var..|
|00001d50| 09 09 69 6e 66 6f 3a 20 | 46 49 6e 66 6f 3b 0d 09 |..info: |FInfo;..|
|00001d60| 09 09 66 73 3a 20 46 53 | 53 70 65 63 3b 0d 09 09 |..fs: FS|Spec;...|
|00001d70| 09 65 72 72 3a 20 4f 53 | 45 72 72 3b 0d 09 62 65 |.err: OS|Err;..be|
|00001d80| 67 69 6e 0d 09 09 65 72 | 72 20 3a 3d 20 49 43 53 |gin...er|r := ICS|
|00001d90| 74 61 6e 64 61 72 64 47 | 65 74 46 69 6c 65 28 27 |tandardG|etFile('|
|00001da0| 41 50 50 4c 27 2c 20 66 | 73 2c 20 69 6e 66 6f 29 |APPL', f|s, info)|
|00001db0| 3b 0d 09 09 44 69 73 70 | 6c 61 79 45 72 72 6f 72 |;...Disp|layError|
|00001dc0| 28 61 63 43 68 6f 6f 73 | 65 41 70 70 6c 69 63 61 |(acChoos|eApplica|
|00001dd0| 74 69 6f 6e 2c 20 65 72 | 72 29 3b 0d 09 09 69 66 |tion, er|r);...if|
|00001de0| 20 65 72 72 20 3d 20 6e | 6f 45 72 72 20 74 68 65 | err = n|oErr the|
|00001df0| 6e 20 62 65 67 69 6e 0d | 09 09 09 73 70 65 63 2e |n begin.|...spec.|
|00001e00| 66 43 72 65 61 74 6f 72 | 20 3a 3d 20 69 6e 66 6f |fCreator| := info|
|00001e10| 2e 66 64 43 72 65 61 74 | 6f 72 3b 0d 09 09 09 73 |.fdCreat|or;....s|
|00001e20| 70 65 63 2e 6e 61 6d 65 | 20 3a 3d 20 66 73 2e 6e |pec.name| := fs.n|
|00001e30| 61 6d 65 3b 0d 09 09 65 | 6e 64 3b 20 28 2a 20 69 |ame;...e|nd; (* i|
|00001e40| 66 20 2a 29 0d 09 09 43 | 68 6f 6f 73 65 41 70 70 |f *)...C|hooseApp|
|00001e50| 6c 69 63 61 74 69 6f 6e | 20 3a 3d 20 65 72 72 20 |lication| := err |
|00001e60| 3d 20 6e 6f 45 72 72 3b | 0d 09 65 6e 64 3b 20 28 |= noErr;|..end; (|
|00001e70| 2a 20 43 68 6f 6f 73 65 | 41 70 70 6c 69 63 61 74 |* Choose|Applicat|
|00001e80| 69 6f 6e 20 2a 29 0d 0d | 09 70 72 6f 63 65 64 75 |ion *)..|.procedu|
|00001e90| 72 65 20 46 69 78 42 75 | 74 74 6f 6e 20 28 64 6c |re FixBu|tton (dl|
|00001ea0| 67 3a 20 44 69 61 6c 6f | 67 50 74 72 29 3b 0d 09 |g: Dialo|gPtr);..|
|00001eb0| 09 76 61 72 0d 09 09 09 | 74 31 2c 20 74 32 3a 20 |.var....|t1, t2: |
|00001ec0| 53 74 72 32 35 35 3b 0d | 09 62 65 67 69 6e 0d 09 |Str255;.|.begin..|
|00001ed0| 09 47 65 74 49 74 65 6d | 54 65 78 74 28 64 6c 67 |.GetItem|Text(dlg|
|00001ee0| 2c 20 64 69 74 41 70 70 | 4e 61 6d 65 2c 20 74 31 |, ditApp|Name, t1|
|00001ef0| 29 3b 0d 09 09 47 65 74 | 49 74 65 6d 54 65 78 74 |);...Get|ItemText|
|00001f00| 28 64 6c 67 2c 20 64 69 | 74 48 65 6c 70 65 72 2c |(dlg, di|tHelper,|
|00001f10| 20 74 32 29 3b 0d 09 09 | 53 65 74 44 43 74 6c 45 | t2);...|SetDCtlE|
|00001f20| 6e 61 62 6c 65 28 64 6c | 67 2c 20 64 69 74 4f 4b |nable(dl|g, ditOK|
|00001f30| 2c 20 28 74 31 20 3c 3e | 20 27 27 29 20 61 6e 64 |, (t1 <>| '') and|
|00001f40| 20 28 74 32 20 3c 3e 20 | 27 27 29 29 3b 0d 09 09 | (t2 <> |''));...|
|00001f50| 4f 75 74 6c 69 6e 65 44 | 65 66 61 75 6c 74 31 28 |OutlineD|efault1(|
|00001f60| 64 6c 67 2c 20 64 69 74 | 41 64 64 55 73 65 72 49 |dlg, dit|AddUserI|
|00001f70| 74 65 6d 29 3b 0d 09 65 | 6e 64 3b 20 28 2a 20 46 |tem);..e|nd; (* F|
|00001f80| 69 78 42 75 74 74 6f 6e | 20 2a 29 0d 0d 09 66 75 |ixButton| *)...fu|
|00001f90| 6e 63 74 69 6f 6e 20 44 | 6f 41 64 64 46 69 6c 74 |nction D|oAddFilt|
|00001fa0| 65 72 20 28 64 6c 67 3a | 20 44 69 61 6c 6f 67 50 |er (dlg:| DialogP|
|00001fb0| 74 72 3b 20 76 61 72 20 | 65 76 65 6e 74 3a 20 45 |tr; var |event: E|
|00001fc0| 76 65 6e 74 52 65 63 6f | 72 64 3b 20 76 61 72 20 |ventReco|rd; var |
|00001fd0| 69 74 65 6d 3a 20 69 6e | 74 65 67 65 72 29 3a 20 |item: in|teger): |
|00001fe0| 62 6f 6f 6c 65 61 6e 3b | 0d 09 09 76 61 72 0d 09 |boolean;|...var..|
|00001ff0| 09 09 72 65 73 3a 20 62 | 6f 6f 6c 65 61 6e 3b 0d |..res: b|oolean;.|
|00002000| 09 62 65 67 69 6e 0d 09 | 09 72 65 73 20 3a 3d 20 |.begin..|.res := |
|00002010| 43 61 6e 63 65 6c 4d 6f | 64 61 6c 46 69 6c 74 65 |CancelMo|dalFilte|
|00002020| 72 28 64 6c 67 2c 20 65 | 76 65 6e 74 2c 20 69 74 |r(dlg, e|vent, it|
|00002030| 65 6d 29 3b 0d 09 09 46 | 69 78 42 75 74 74 6f 6e |em);...F|ixButton|
|00002040| 28 64 6c 67 29 3b 0d 09 | 09 44 6f 41 64 64 46 69 |(dlg);..|.DoAddFi|
|00002050| 6c 74 65 72 20 3a 3d 20 | 72 65 73 3b 0d 09 65 6e |lter := |res;..en|
|00002060| 64 3b 28 2a 20 44 6f 41 | 64 64 46 69 6c 74 65 72 |d;(* DoA|ddFilter|
|00002070| 20 2a 29 0d 0d 09 66 75 | 6e 63 74 69 6f 6e 20 44 | *)...fu|nction D|
|00002080| 6f 45 64 69 74 20 28 65 | 6e 74 72 69 65 73 3a 20 |oEdit (e|ntries: |
|00002090| 48 61 6e 64 6c 65 3b 20 | 6c 68 3a 20 4c 69 73 74 |Handle; |lh: List|
|000020a0| 48 61 6e 64 6c 65 3b 20 | 76 61 72 20 63 68 6f 6f |Handle; |var choo|
|000020b0| 73 65 6e 5f 61 70 70 3a | 20 49 6e 74 65 72 6e 61 |sen_app:| Interna|
|000020c0| 6c 41 70 70 53 70 65 63 | 29 3a 20 4f 53 45 72 72 |lAppSpec|): OSErr|
|000020d0| 3b 0d 09 09 76 61 72 0d | 09 09 09 64 6c 67 3a 20 |;...var.|...dlg: |
|000020e0| 44 69 61 6c 6f 67 50 74 | 72 3b 0d 09 09 09 69 74 |DialogPt|r;....it|
|000020f0| 65 6d 3a 20 69 6e 74 65 | 67 65 72 3b 0d 09 09 09 |em: inte|ger;....|
|00002100| 65 72 72 3a 20 4f 53 45 | 72 72 3b 0d 09 09 09 73 |err: OSE|rr;....s|
|00002110| 61 76 65 64 5f 73 74 61 | 74 65 3a 20 50 74 72 3b |aved_sta|te: Ptr;|
|00002120| 0d 09 62 65 67 69 6e 0d | 09 09 65 6e 74 72 69 65 |..begin.|..entrie|
|00002130| 73 20 3a 3d 20 65 6e 74 | 72 69 65 73 3b 20 7b 20 |s := ent|ries; { |
|00002140| 55 6e 75 73 65 64 20 7d | 0d 09 09 6c 68 20 3a 3d |Unused }|...lh :=|
|00002150| 20 6c 68 3b 20 7b 20 55 | 6e 75 73 65 64 20 7d 0d | lh; { U|nused }.|
|00002160| 09 09 65 72 72 20 3a 3d | 20 6e 6f 45 72 72 3b 0d |..err :=| noErr;.|
|00002170| 09 09 64 6c 67 20 3a 3d | 20 47 65 74 4e 65 77 44 |..dlg :=| GetNewD|
|00002180| 69 61 6c 6f 67 28 39 30 | 30 2c 20 6e 69 6c 2c 20 |ialog(90|0, nil, |
|00002190| 57 69 6e 64 6f 77 50 74 | 72 28 2d 31 29 29 3b 0d |WindowPt|r(-1));.|
|000021a0| 09 09 69 66 20 64 6c 67 | 20 3d 20 6e 69 6c 20 74 |..if dlg| = nil t|
|000021b0| 68 65 6e 20 62 65 67 69 | 6e 0d 09 09 09 65 72 72 |hen begi|n....err|
|000021c0| 20 3a 3d 20 6d 65 6d 46 | 75 6c 6c 45 72 72 3b 0d | := memF|ullErr;.|
|000021d0| 09 09 65 6e 64 3b 20 28 | 2a 20 69 66 20 2a 29 0d |..end; (|* if *).|
|000021e0| 09 09 69 66 20 65 72 72 | 20 3d 20 6e 6f 45 72 72 |..if err| = noErr|
|000021f0| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 09 09 09 53 | then be|gin....S|
|00002200| 65 74 55 70 44 65 66 61 | 75 6c 74 4f 75 74 6c 69 |etUpDefa|ultOutli|
|00002210| 6e 65 28 64 6c 67 2c 20 | 64 69 74 4f 4b 2c 20 64 |ne(dlg, |ditOK, d|
|00002220| 69 74 41 64 64 55 73 65 | 72 49 74 65 6d 29 3b 0d |itAddUse|rItem);.|
|00002230| 09 09 09 53 65 74 49 74 | 65 6d 54 65 78 74 28 64 |...SetIt|emText(d|
|00002240| 6c 67 2c 20 64 69 74 48 | 65 6c 70 65 72 2c 20 63 |lg, ditH|elper, c|
|00002250| 68 6f 6f 73 65 6e 5f 61 | 70 70 2e 6b 65 79 29 3b |hoosen_a|pp.key);|
|00002260| 0d 09 09 09 53 65 74 49 | 74 65 6d 54 65 78 74 28 |....SetI|temText(|
|00002270| 64 6c 67 2c 20 64 69 74 | 41 70 70 4e 61 6d 65 2c |dlg, dit|AppName,|
|00002280| 20 63 68 6f 6f 73 65 6e | 5f 61 70 70 2e 61 70 70 | choosen|_app.app|
|00002290| 73 70 65 63 2e 6e 61 6d | 65 29 3b 0d 09 09 09 53 |spec.nam|e);....S|
|000022a0| 65 6c 65 63 74 44 69 61 | 6c 6f 67 49 74 65 6d 54 |electDia|logItemT|
|000022b0| 65 78 74 28 64 6c 67 2c | 20 64 69 74 48 65 6c 70 |ext(dlg,| ditHelp|
|000022c0| 65 72 2c 20 30 2c 20 32 | 35 35 29 3b 0d 09 09 09 |er, 0, 2|55);....|
|000022d0| 46 69 78 42 75 74 74 6f | 6e 28 64 6c 67 29 3b 0d |FixButto|n(dlg);.|
|000022e0| 09 09 09 53 68 6f 77 57 | 69 6e 64 6f 77 28 64 6c |...ShowW|indow(dl|
|000022f0| 67 29 3b 0d 09 09 09 44 | 69 73 61 62 6c 65 4d 65 |g);....D|isableMe|
|00002300| 6e 75 42 61 72 28 73 61 | 76 65 64 5f 73 74 61 74 |nuBar(sa|ved_stat|
|00002310| 65 2c 20 2d 31 29 3b 0d | 09 09 09 49 6e 69 74 43 |e, -1);.|...InitC|
|00002320| 75 72 73 6f 72 3b 0d 09 | 09 09 72 65 70 65 61 74 |ursor;..|..repeat|
|00002330| 0d 09 09 09 09 4d 6f 76 | 61 62 6c 65 4d 6f 64 61 |.....Mov|ableModa|
|00002340| 6c 44 69 61 6c 6f 67 28 | 40 44 6f 41 64 64 46 69 |lDialog(|@DoAddFi|
|00002350| 6c 74 65 72 2c 20 69 74 | 65 6d 29 3b 0d 09 09 09 |lter, it|em);....|
|00002360| 09 63 61 73 65 20 69 74 | 65 6d 20 6f 66 0d 09 09 |.case it|em of...|
|00002370| 09 09 09 64 69 74 43 68 | 6f 6f 73 65 41 70 70 6c |...ditCh|ooseAppl|
|00002380| 69 63 61 74 69 6f 6e 3a | 20 20 62 65 67 69 6e 0d |ication:| begin.|
|00002390| 09 09 09 09 09 09 69 66 | 20 43 68 6f 6f 73 65 41 |......if| ChooseA|
|000023a0| 70 70 6c 69 63 61 74 69 | 6f 6e 28 63 68 6f 6f 73 |pplicati|on(choos|
|000023b0| 65 6e 5f 61 70 70 2e 61 | 70 70 73 70 65 63 29 20 |en_app.a|ppspec) |
|000023c0| 74 68 65 6e 20 62 65 67 | 69 6e 0d 09 09 09 09 09 |then beg|in......|
|000023d0| 09 09 53 65 74 49 74 65 | 6d 54 65 78 74 28 64 6c |..SetIte|mText(dl|
|000023e0| 67 2c 20 64 69 74 41 70 | 70 4e 61 6d 65 2c 20 63 |g, ditAp|pName, c|
|000023f0| 68 6f 6f 73 65 6e 5f 61 | 70 70 2e 61 70 70 73 70 |hoosen_a|pp.appsp|
|00002400| 65 63 2e 6e 61 6d 65 29 | 3b 0d 09 09 09 09 09 09 |ec.name)|;.......|
|00002410| 09 46 69 78 42 75 74 74 | 6f 6e 28 64 6c 67 29 3b |.FixButt|on(dlg);|
|00002420| 0d 09 09 09 09 09 09 65 | 6e 64 3b 20 28 2a 20 69 |.......e|nd; (* i|
|00002430| 66 20 2a 29 0d 09 09 09 | 09 09 65 6e 64 3b 0d 09 |f *)....|..end;..|
|00002440| 09 09 09 09 6f 74 68 65 | 72 77 69 73 65 0d 09 09 |....othe|rwise...|
|00002450| 09 09 09 09 3b 0d 09 09 | 09 09 65 6e 64 3b 20 28 |....;...|..end; (|
|00002460| 2a 20 63 61 73 65 20 2a | 29 0d 09 09 09 75 6e 74 |* case *|)....unt|
|00002470| 69 6c 20 69 74 65 6d 20 | 69 6e 20 5b 64 69 74 4f |il item |in [ditO|
|00002480| 4b 2c 20 64 69 74 43 61 | 6e 63 65 6c 5d 3b 0d 09 |K, ditCa|ncel];..|
|00002490| 09 09 69 66 20 69 74 65 | 6d 20 3d 20 64 69 74 4f |..if ite|m = ditO|
|000024a0| 4b 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 09 09 09 |K then b|egin....|
|000024b0| 09 47 65 74 49 74 65 6d | 54 65 78 74 28 64 6c 67 |.GetItem|Text(dlg|
|000024c0| 2c 20 64 69 74 48 65 6c | 70 65 72 2c 20 63 68 6f |, ditHel|per, cho|
|000024d0| 6f 73 65 6e 5f 61 70 70 | 2e 6b 65 79 29 3b 0d 09 |osen_app|.key);..|
|000024e0| 09 09 09 63 68 6f 6f 73 | 65 6e 5f 61 70 70 2e 6b |...choos|en_app.k|
|000024f0| 65 79 20 3a 3d 20 63 6f | 6e 63 61 74 28 6b 49 43 |ey := co|ncat(kIC|
|00002500| 48 65 6c 70 65 72 2c 20 | 63 68 6f 6f 73 65 6e 5f |Helper, |choosen_|
|00002510| 61 70 70 2e 6b 65 79 29 | 3b 0d 09 09 09 65 6e 64 |app.key)|;....end|
|00002520| 20 65 6c 73 65 20 62 65 | 67 69 6e 0d 09 09 09 09 | else be|gin.....|
|00002530| 65 72 72 20 3a 3d 20 75 | 73 65 72 43 61 6e 63 65 |err := u|serCance|
|00002540| 6c 65 64 45 72 72 3b 0d | 09 09 09 65 6e 64 3b 20 |ledErr;.|...end; |
|00002550| 28 2a 20 69 66 20 2a 29 | 0d 09 09 09 52 65 45 6e |(* if *)|....ReEn|
|00002560| 61 62 6c 65 4d 65 6e 75 | 42 61 72 28 73 61 76 65 |ableMenu|Bar(save|
|00002570| 64 5f 73 74 61 74 65 29 | 3b 0d 09 09 09 44 69 73 |d_state)|;....Dis|
|00002580| 70 6f 73 65 44 69 61 6c | 6f 67 28 64 6c 67 29 3b |poseDial|og(dlg);|
|00002590| 0d 09 09 65 6e 64 3b 20 | 28 2a 20 69 66 20 2a 29 |...end; |(* if *)|
|000025a0| 0d 09 09 44 6f 45 64 69 | 74 20 3a 3d 20 65 72 72 |...DoEdi|t := err|
|000025b0| 3b 0d 09 65 6e 64 3b 0d | 0d 09 66 75 6e 63 74 69 |;..end;.|..functi|
|000025c0| 6f 6e 20 44 6f 41 64 64 | 20 28 65 6e 74 72 69 65 |on DoAdd| (entrie|
|000025d0| 73 3a 20 48 61 6e 64 6c | 65 3b 20 6c 68 3a 20 4c |s: Handl|e; lh: L|
|000025e0| 69 73 74 48 61 6e 64 6c | 65 29 3a 20 4f 53 45 72 |istHandl|e): OSEr|
|000025f0| 72 3b 0d 09 09 76 61 72 | 0d 09 09 09 63 68 6f 6f |r;...var|....choo|
|00002600| 73 65 6e 5f 61 70 70 3a | 20 49 6e 74 65 72 6e 61 |sen_app:| Interna|
|00002610| 6c 41 70 70 53 70 65 63 | 3b 0d 09 09 09 6a 75 6e |lAppSpec|;....jun|
|00002620| 6b 3a 20 69 6e 74 65 67 | 65 72 3b 0d 09 09 09 65 |k: integ|er;....e|
|00002630| 72 72 3a 20 4f 53 45 72 | 72 3b 0d 09 62 65 67 69 |rr: OSEr|r;..begi|
|00002640| 6e 0d 09 09 63 68 6f 6f | 73 65 6e 5f 61 70 70 2e |n...choo|sen_app.|
|00002650| 61 70 70 73 70 65 63 2e | 6e 61 6d 65 20 3a 3d 20 |appspec.|name := |
|00002660| 27 27 3b 0d 09 09 63 68 | 6f 6f 73 65 6e 5f 61 70 |'';...ch|oosen_ap|
|00002670| 70 2e 6c 6f 63 6b 65 64 | 20 3a 3d 20 66 61 6c 73 |p.locked| := fals|
|00002680| 65 3b 0d 09 09 63 68 6f | 6f 73 65 6e 5f 61 70 70 |e;...cho|osen_app|
|00002690| 2e 6b 65 79 20 3a 3d 20 | 27 27 3b 0d 09 09 65 72 |.key := |'';...er|
|000026a0| 72 20 3a 3d 20 44 6f 45 | 64 69 74 28 65 6e 74 72 |r := DoE|dit(entr|
|000026b0| 69 65 73 2c 20 6c 68 2c | 20 63 68 6f 6f 73 65 6e |ies, lh,| choosen|
|000026c0| 5f 61 70 70 29 3b 0d 09 | 09 69 66 20 65 72 72 20 |_app);..|.if err |
|000026d0| 3d 20 6e 6f 45 72 72 20 | 74 68 65 6e 20 62 65 67 |= noErr |then beg|
|000026e0| 69 6e 0d 09 09 09 65 72 | 72 20 3a 3d 20 50 74 72 |in....er|r := Ptr|
|000026f0| 41 6e 64 48 61 6e 64 28 | 40 63 68 6f 6f 73 65 6e |AndHand(|@choosen|
|00002700| 5f 61 70 70 2c 20 65 6e | 74 72 69 65 73 2c 20 73 |_app, en|tries, s|
|00002710| 69 7a 65 6f 66 28 63 68 | 6f 6f 73 65 6e 5f 61 70 |izeof(ch|oosen_ap|
|00002720| 70 29 29 3b 0d 09 09 09 | 69 66 20 65 72 72 20 3d |p));....|if err =|
|00002730| 20 6e 6f 45 72 72 20 74 | 68 65 6e 20 62 65 67 69 | noErr t|hen begi|
|00002740| 6e 0d 09 09 09 09 6a 75 | 6e 6b 20 3a 3d 20 4c 41 |n.....ju|nk := LA|
|00002750| 64 64 52 6f 77 28 31 2c | 20 33 32 37 36 37 2c 20 |ddRow(1,| 32767, |
|00002760| 6c 68 29 3b 0d 09 09 09 | 65 6e 64 3b 20 28 2a 20 |lh);....|end; (* |
|00002770| 69 66 20 2a 29 0d 09 09 | 65 6e 64 3b 0d 09 09 44 |if *)...|end;...D|
|00002780| 6f 41 64 64 20 3a 3d 20 | 65 72 72 3b 0d 09 65 6e |oAdd := |err;..en|
|00002790| 64 3b 20 28 2a 20 44 6f | 41 64 64 20 2a 29 0d 0d |d; (* Do|Add *)..|
|000027a0| 09 66 75 6e 63 74 69 6f | 6e 20 44 6f 43 68 61 6e |.functio|n DoChan|
|000027b0| 67 65 20 28 73 65 6c 65 | 63 74 69 6f 6e 3a 20 69 |ge (sele|ction: i|
|000027c0| 6e 74 65 67 65 72 3b 20 | 65 6e 74 72 69 65 73 3a |nteger; |entries:|
|000027d0| 20 48 61 6e 64 6c 65 3b | 20 6c 68 3a 20 4c 69 73 | Handle;| lh: Lis|
|000027e0| 74 48 61 6e 64 6c 65 29 | 3a 20 4f 53 45 72 72 3b |tHandle)|: OSErr;|
|000027f0| 0d 09 09 76 61 72 0d 09 | 09 09 65 72 72 3a 20 4f |...var..|..err: O|
|00002800| 53 45 72 72 3b 0d 09 09 | 09 74 6d 70 73 70 65 63 |SErr;...|.tmpspec|
|00002810| 3a 20 49 6e 74 65 72 6e | 61 6c 41 70 70 53 70 65 |: Intern|alAppSpe|
|00002820| 63 3b 0d 09 62 65 67 69 | 6e 0d 09 09 47 65 74 4e |c;..begi|n...GetN|
|00002830| 74 68 45 6c 65 6d 65 6e | 74 28 65 6e 74 72 69 65 |thElemen|t(entrie|
|00002840| 73 2c 20 73 65 6c 65 63 | 74 69 6f 6e 20 2b 20 31 |s, selec|tion + 1|
|00002850| 2c 20 74 6d 70 73 70 65 | 63 29 3b 0d 09 09 44 65 |, tmpspe|c);...De|
|00002860| 6c 65 74 65 28 74 6d 70 | 73 70 65 63 2e 6b 65 79 |lete(tmp|spec.key|
|00002870| 2c 20 31 2c 20 6c 65 6e | 67 74 68 28 6b 49 43 48 |, 1, len|gth(kICH|
|00002880| 65 6c 70 65 72 29 29 3b | 0d 09 09 65 72 72 20 3a |elper));|...err :|
|00002890| 3d 20 44 6f 45 64 69 74 | 28 65 6e 74 72 69 65 73 |= DoEdit|(entries|
|000028a0| 2c 20 6c 68 2c 20 74 6d | 70 73 70 65 63 29 3b 0d |, lh, tm|pspec);.|
|000028b0| 09 09 69 66 20 65 72 72 | 20 3d 20 6e 6f 45 72 72 |..if err| = noErr|
|000028c0| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 09 09 09 53 | then be|gin....S|
|000028d0| 65 74 4e 74 68 45 6c 65 | 6d 65 6e 74 28 65 6e 74 |etNthEle|ment(ent|
|000028e0| 72 69 65 73 2c 20 73 65 | 6c 65 63 74 69 6f 6e 20 |ries, se|lection |
|000028f0| 2b 20 31 2c 20 74 6d 70 | 73 70 65 63 29 3b 0d 09 |+ 1, tmp|spec);..|
|00002900| 09 09 65 72 72 20 3a 3d | 20 6e 6f 45 72 72 3b 0d |..err :=| noErr;.|
|00002910| 09 09 65 6e 64 20 65 6c | 73 65 20 62 65 67 69 6e |..end el|se begin|
|00002920| 0d 09 09 09 65 72 72 20 | 3a 3d 20 75 73 65 72 43 |....err |:= userC|
|00002930| 61 6e 63 65 6c 65 64 45 | 72 72 3b 0d 09 09 65 6e |anceledE|rr;...en|
|00002940| 64 3b 20 28 2a 20 69 66 | 20 2a 29 0d 09 09 44 6f |d; (* if| *)...Do|
|00002950| 43 68 61 6e 67 65 20 3a | 3d 20 65 72 72 3b 0d 09 |Change :|= err;..|
|00002960| 65 6e 64 3b 20 28 2a 20 | 44 6f 43 68 61 6e 67 65 |end; (* |DoChange|
|00002970| 20 2a 29 0d 0d 09 66 75 | 6e 63 74 69 6f 6e 20 44 | *)...fu|nction D|
|00002980| 6f 44 65 6c 65 74 65 20 | 28 73 65 6c 65 63 74 69 |oDelete |(selecti|
|00002990| 6f 6e 3a 20 69 6e 74 65 | 67 65 72 3b 20 65 6e 74 |on: inte|ger; ent|
|000029a0| 72 69 65 73 3a 20 48 61 | 6e 64 6c 65 3b 20 6c 68 |ries: Ha|ndle; lh|
|000029b0| 3a 20 4c 69 73 74 48 61 | 6e 64 6c 65 29 3a 20 4f |: ListHa|ndle): O|
|000029c0| 53 45 72 72 3b 0d 09 09 | 76 61 72 0d 09 09 09 65 |SErr;...|var....e|
|000029d0| 72 72 3a 20 4f 53 45 72 | 72 3b 0d 09 09 09 61 70 |rr: OSEr|r;....ap|
|000029e0| 73 70 65 63 3a 20 49 6e | 74 65 72 6e 61 6c 41 70 |spec: In|ternalAp|
|000029f0| 70 53 70 65 63 3b 0d 09 | 09 09 70 6f 73 3a 20 6c |pSpec;..|..pos: l|
|00002a00| 6f 6e 67 69 6e 74 3b 0d | 09 09 09 6a 75 6e 6b 3a |ongint;.|...junk:|
|00002a10| 20 4f 53 45 72 72 3b 0d | 09 62 65 67 69 6e 0d 09 | OSErr;.|.begin..|
|00002a20| 09 65 72 72 20 3a 3d 20 | 49 43 4d 61 70 45 72 72 |.err := |ICMapErr|
|00002a30| 28 49 43 42 65 67 69 6e | 28 47 65 74 49 6e 73 74 |(ICBegin|(GetInst|
|00002a40| 61 6e 63 65 2c 20 69 63 | 52 65 61 64 57 72 69 74 |ance, ic|ReadWrit|
|00002a50| 65 50 65 72 6d 29 29 3b | 0d 09 09 69 66 20 65 72 |ePerm));|...if er|
|00002a60| 72 20 3d 20 6e 6f 45 72 | 72 20 74 68 65 6e 20 62 |r = noEr|r then b|
|00002a70| 65 67 69 6e 0d 09 09 09 | 47 65 74 4e 74 68 45 6c |egin....|GetNthEl|
|00002a80| 65 6d 65 6e 74 28 65 6e | 74 72 69 65 73 2c 20 73 |ement(en|tries, s|
|00002a90| 65 6c 65 63 74 69 6f 6e | 20 2b 20 31 2c 20 61 70 |election| + 1, ap|
|00002aa0| 73 70 65 63 29 3b 0d 09 | 09 09 65 72 72 20 3a 3d |spec);..|..err :=|
|00002ab0| 20 49 43 44 65 6c 65 74 | 65 50 72 65 66 28 47 65 | ICDelet|ePref(Ge|
|00002ac0| 74 49 6e 73 74 61 6e 63 | 65 2c 20 61 70 73 70 65 |tInstanc|e, apspe|
|00002ad0| 63 2e 6b 65 79 29 3b 0d | 09 09 09 6a 75 6e 6b 20 |c.key);.|...junk |
|00002ae0| 3a 3d 20 49 43 4d 61 70 | 45 72 72 28 49 43 45 6e |:= ICMap|Err(ICEn|
|00002af0| 64 28 47 65 74 49 6e 73 | 74 61 6e 63 65 29 29 3b |d(GetIns|tance));|
|00002b00| 0d 09 09 65 6e 64 3b 20 | 28 2a 20 69 66 20 2a 29 |...end; |(* if *)|
|00002b10| 0d 09 09 69 66 20 65 72 | 72 20 3d 20 6e 6f 45 72 |...if er|r = noEr|
|00002b20| 72 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 09 09 09 |r then b|egin....|
|00002b30| 70 6f 73 20 3a 3d 20 4d | 75 6e 67 65 72 28 65 6e |pos := M|unger(en|
|00002b40| 74 72 69 65 73 2c 20 73 | 65 6c 65 63 74 69 6f 6e |tries, s|election|
|00002b50| 20 2a 20 73 69 7a 65 6f | 66 28 49 6e 74 65 72 6e | * sizeo|f(Intern|
|00002b60| 61 6c 41 70 70 53 70 65 | 63 29 2c 20 6e 69 6c 2c |alAppSpe|c), nil,|
|00002b70| 20 73 69 7a 65 6f 66 28 | 49 6e 74 65 72 6e 61 6c | sizeof(|Internal|
|00002b80| 41 70 70 53 70 65 63 29 | 2c 20 50 74 72 28 2d 31 |AppSpec)|, Ptr(-1|
|00002b90| 29 2c 20 30 29 3b 0d 09 | 09 09 65 72 72 20 3a 3d |), 0);..|..err :=|
|00002ba0| 20 4d 65 6d 45 72 72 6f | 72 3b 0d 09 09 09 69 66 | MemErro|r;....if|
|00002bb0| 20 65 72 72 20 3d 20 6e | 6f 45 72 72 20 74 68 65 | err = n|oErr the|
|00002bc0| 6e 20 62 65 67 69 6e 0d | 09 09 09 09 4c 44 65 6c |n begin.|....LDel|
|00002bd0| 52 6f 77 28 31 2c 20 73 | 65 6c 65 63 74 69 6f 6e |Row(1, s|election|
|00002be0| 2c 20 6c 68 29 3b 0d 09 | 09 09 65 6e 64 3b 20 28 |, lh);..|..end; (|
|00002bf0| 2a 20 69 66 20 2a 29 0d | 09 09 65 6e 64 3b 20 28 |* if *).|..end; (|
|00002c00| 2a 20 69 66 20 2a 29 0d | 09 09 44 6f 44 65 6c 65 |* if *).|..DoDele|
|00002c10| 74 65 20 3a 3d 20 65 72 | 72 3b 0d 09 65 6e 64 3b |te := er|r;..end;|
|00002c20| 20 28 2a 20 44 6f 44 65 | 6c 65 74 65 20 2a 29 0d | (* DoDe|lete *).|
|00002c30| 0d 09 66 75 6e 63 74 69 | 6f 6e 20 57 68 61 74 43 |..functi|on WhatC|
|00002c40| 6c 69 63 6b 48 65 6c 70 | 65 72 20 28 77 74 3a 20 |lickHelp|er (wt: |
|00002c50| 57 69 6e 64 6f 77 54 79 | 70 65 3b 20 69 74 65 6d |WindowTy|pe; item|
|00002c60| 3a 20 69 6e 74 65 67 65 | 72 3b 20 65 72 3a 20 65 |: intege|r; er: e|
|00002c70| 76 65 6e 74 52 65 63 6f | 72 64 29 3a 20 4f 53 45 |ventReco|rd): OSE|
|00002c80| 72 72 3b 0d 09 09 76 61 | 72 0d 09 09 09 6c 68 3a |rr;...va|r....lh:|
|00002c90| 20 4c 69 73 74 48 61 6e | 64 6c 65 3b 0d 09 09 09 | ListHan|dle;....|
|00002ca0| 65 6e 74 72 69 65 73 3a | 20 48 61 6e 64 6c 65 3b |entries:| Handle;|
|00002cb0| 0d 09 09 09 73 65 6c 65 | 63 74 69 6f 6e 3a 20 69 |....sele|ction: i|
|00002cc0| 6e 74 65 67 65 72 3b 0d | 09 09 09 65 72 72 3a 20 |nteger;.|...err: |
|00002cd0| 4f 53 45 72 72 3b 0d 09 | 62 65 67 69 6e 0d 09 09 |OSErr;..|begin...|
|00002ce0| 65 6e 74 72 69 65 73 20 | 3a 3d 20 48 61 6e 64 6c |entries |:= Handl|
|00002cf0| 65 28 77 69 6e 64 6f 77 | 69 6e 66 6f 5b 77 74 5d |e(window|info[wt]|
|00002d00| 2e 69 74 65 6d 73 5b 64 | 69 74 4c 69 73 74 5d 5e |.items[d|itList]^|
|00002d10| 2e 64 61 74 61 29 3b 0d | 09 09 6c 68 20 3a 3d 20 |.data);.|..lh := |
|00002d20| 4c 69 73 74 48 61 6e 64 | 6c 65 28 77 69 6e 64 6f |ListHand|le(windo|
|00002d30| 77 69 6e 66 6f 5b 77 74 | 5d 2e 69 74 65 6d 73 5b |winfo[wt|].items[|
|00002d40| 64 69 74 4c 69 73 74 5d | 5e 2e 73 70 61 72 65 5f |ditList]|^.spare_|
|00002d50| 64 61 74 61 29 3b 0d 09 | 09 47 6c 6f 62 61 6c 54 |data);..|.GlobalT|
|00002d60| 6f 4c 6f 63 61 6c 28 65 | 72 2e 77 68 65 72 65 29 |oLocal(e|r.where)|
|00002d70| 3b 0d 09 09 73 65 6c 65 | 63 74 69 6f 6e 20 3a 3d |;...sele|ction :=|
|00002d80| 20 53 65 6c 65 63 74 65 | 64 4c 69 6e 65 28 6c 68 | Selecte|dLine(lh|
|00002d90| 29 3b 0d 09 09 65 72 72 | 20 3a 3d 20 31 3b 0d 09 |);...err| := 1;..|
|00002da0| 09 63 61 73 65 20 69 74 | 65 6d 20 6f 66 0d 09 09 |.case it|em of...|
|00002db0| 09 64 69 74 41 64 64 3a | 20 0d 09 09 09 09 65 72 |.ditAdd:| .....er|
|00002dc0| 72 20 3a 3d 20 44 6f 41 | 64 64 28 65 6e 74 72 69 |r := DoA|dd(entri|
|00002dd0| 65 73 2c 20 6c 68 29 3b | 0d 09 09 09 64 69 74 43 |es, lh);|....ditC|
|00002de0| 68 61 6e 67 65 3a 20 0d | 09 09 09 09 65 72 72 20 |hange: .|....err |
|00002df0| 3a 3d 20 44 6f 43 68 61 | 6e 67 65 28 73 65 6c 65 |:= DoCha|nge(sele|
|00002e00| 63 74 69 6f 6e 2c 20 65 | 6e 74 72 69 65 73 2c 20 |ction, e|ntries, |
|00002e10| 6c 68 29 3b 0d 09 09 09 | 64 69 74 44 65 6c 65 74 |lh);....|ditDelet|
|00002e20| 65 3a 20 0d 09 09 09 09 | 69 66 20 73 65 6c 65 63 |e: .....|if selec|
|00002e30| 74 69 6f 6e 20 3c 3e 20 | 2d 31 20 74 68 65 6e 20 |tion <> |-1 then |
|00002e40| 62 65 67 69 6e 0d 09 09 | 09 09 09 65 72 72 20 3a |begin...|...err :|
|00002e50| 3d 20 44 6f 44 65 6c 65 | 74 65 28 73 65 6c 65 63 |= DoDele|te(selec|
|00002e60| 74 69 6f 6e 2c 20 65 6e | 74 72 69 65 73 2c 20 6c |tion, en|tries, l|
|00002e70| 68 29 3b 0d 09 09 09 09 | 65 6e 64 3b 20 28 2a 20 |h);.....|end; (* |
|00002e80| 69 66 20 2a 29 0d 09 09 | 09 64 69 74 4c 69 73 74 |if *)...|.ditList|
|00002e90| 3a 20 20 62 65 67 69 6e | 0d 09 09 09 09 69 66 20 |: begin|.....if |
|00002ea0| 4c 43 6c 69 63 6b 28 65 | 72 2e 77 68 65 72 65 2c |LClick(e|r.where,|
|00002eb0| 20 30 2c 20 6c 68 29 20 | 74 68 65 6e 20 62 65 67 | 0, lh) |then beg|
|00002ec0| 69 6e 0d 09 09 09 09 09 | 73 65 6c 65 63 74 69 6f |in......|selectio|
|00002ed0| 6e 20 3a 3d 20 53 65 6c | 65 63 74 65 64 4c 69 6e |n := Sel|ectedLin|
|00002ee0| 65 28 6c 68 29 3b 09 09 | 09 28 2a 20 73 65 6c 65 |e(lh);..|.(* sele|
|00002ef0| 63 74 69 6f 6e 20 6d 61 | 79 20 68 61 76 65 20 62 |ction ma|y have b|
|00002f00| 65 65 6e 20 63 68 61 6e | 67 65 64 20 62 79 20 4c |een chan|ged by L|
|00002f10| 43 6c 69 63 6b 20 2a 29 | 0d 09 09 09 09 09 69 66 |Click *)|......if|
|00002f20| 20 45 6e 74 72 79 4c 6f | 63 6b 65 64 28 65 6e 74 | EntryLo|cked(ent|
|00002f30| 72 69 65 73 2c 20 73 65 | 6c 65 63 74 69 6f 6e 20 |ries, se|lection |
|00002f40| 2b 20 31 29 20 74 68 65 | 6e 20 62 65 67 69 6e 0d |+ 1) the|n begin.|
|00002f50| 09 09 09 09 09 09 4c 6f | 63 6b 65 64 41 6c 65 72 |......Lo|ckedAler|
|00002f60| 74 28 77 74 2c 20 69 74 | 65 6d 29 3b 0d 09 09 09 |t(wt, it|em);....|
|00002f70| 09 09 09 65 72 72 20 3a | 3d 20 75 73 65 72 43 61 |...err :|= userCa|
|00002f80| 6e 63 65 6c 65 64 45 72 | 72 3b 0d 09 09 09 09 09 |nceledEr|r;......|
|00002f90| 65 6e 64 20 65 6c 73 65 | 20 62 65 67 69 6e 0d 09 |end else| begin..|
|00002fa0| 09 09 09 09 09 46 6c 61 | 73 68 49 74 65 6d 28 77 |.....Fla|shItem(w|
|00002fb0| 69 6e 64 6f 77 69 6e 66 | 6f 5b 77 74 5d 2e 77 69 |indowinf|o[wt].wi|
|00002fc0| 6e 64 6f 77 2c 20 64 69 | 74 43 68 61 6e 67 65 29 |ndow, di|tChange)|
|00002fd0| 3b 0d 09 09 09 09 09 09 | 65 72 72 20 3a 3d 20 44 |;.......|err := D|
|00002fe0| 6f 43 68 61 6e 67 65 28 | 73 65 6c 65 63 74 69 6f |oChange(|selectio|
|00002ff0| 6e 2c 20 65 6e 74 72 69 | 65 73 2c 20 6c 68 29 3b |n, entri|es, lh);|
|00003000| 0d 09 09 09 09 09 65 6e | 64 3b 20 28 2a 20 69 66 |......en|d; (* if|
|00003010| 20 2a 29 0d 09 09 09 09 | 65 6e 64 3b 20 28 2a 20 | *).....|end; (* |
|00003020| 69 66 20 2a 29 0d 09 09 | 09 65 6e 64 3b 0d 09 09 |if *)...|.end;...|
|00003030| 65 6e 64 3b 20 28 2a 20 | 63 61 73 65 20 2a 29 0d |end; (* |case *).|
|00003040| 09 09 69 66 20 65 72 72 | 20 3d 20 6e 6f 45 72 72 |..if err| = noErr|
|00003050| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 09 09 09 44 | then be|gin....D|
|00003060| 69 72 74 79 44 6f 63 75 | 6d 65 6e 74 3b 0d 09 09 |irtyDocu|ment;...|
|00003070| 65 6e 64 3b 20 28 2a 20 | 69 66 20 2a 29 0d 09 09 |end; (* |if *)...|
|00003080| 69 66 20 65 72 72 20 3d | 20 31 20 74 68 65 6e 20 |if err =| 1 then |
|00003090| 62 65 67 69 6e 0d 09 09 | 09 65 72 72 20 3a 3d 20 |begin...|.err := |
|000030a0| 6e 6f 45 72 72 3b 0d 09 | 09 65 6e 64 3b 20 28 2a |noErr;..|.end; (*|
|000030b0| 20 69 66 20 2a 29 0d 09 | 09 44 69 6d 42 75 74 74 | if *)..|.DimButt|
|000030c0| 6f 6e 73 28 77 74 29 3b | 0d 09 09 57 68 61 74 43 |ons(wt);|...WhatC|
|000030d0| 6c 69 63 6b 48 65 6c 70 | 65 72 20 3a 3d 20 65 72 |lickHelp|er := er|
|000030e0| 72 3b 0d 09 65 6e 64 3b | 20 28 2a 20 57 68 61 74 |r;..end;| (* What|
|000030f0| 43 6c 69 63 6b 48 65 6c | 70 65 72 20 2a 29 0d 0d |ClickHel|per *)..|
|00003100| 09 66 75 6e 63 74 69 6f | 6e 20 57 68 61 74 46 6c |.functio|n WhatFl|
|00003110| 75 73 68 48 65 6c 70 65 | 72 20 28 77 74 3a 20 57 |ushHelpe|r (wt: W|
|00003120| 69 6e 64 6f 77 54 79 70 | 65 3b 20 69 74 65 6d 3a |indowTyp|e; item:|
|00003130| 20 69 6e 74 65 67 65 72 | 29 3a 20 4f 53 45 72 72 | integer|): OSErr|
|00003140| 3b 0d 09 09 76 61 72 0d | 09 09 09 65 72 72 3a 20 |;...var.|...err: |
|00003150| 4f 53 65 72 72 3b 0d 09 | 09 09 65 6e 74 72 69 65 |OSerr;..|..entrie|
|00003160| 73 3a 20 48 61 6e 64 6c | 65 3b 0d 09 09 09 69 3a |s: Handl|e;....i:|
|00003170| 20 69 6e 74 65 67 65 72 | 3b 0d 09 09 09 61 70 70 | integer|;....app|
|00003180| 73 70 65 63 3a 20 49 6e | 74 65 72 6e 61 6c 41 70 |spec: In|ternalAp|
|00003190| 70 53 70 65 63 3b 0d 09 | 09 09 66 69 72 73 74 5f |pSpec;..|..first_|
|000031a0| 65 72 72 3a 20 4f 53 45 | 72 72 3b 0d 09 62 65 67 |err: OSE|rr;..beg|
|000031b0| 69 6e 0d 09 09 69 74 65 | 6d 20 3a 3d 20 69 74 65 |in...ite|m := ite|
|000031c0| 6d 3b 20 7b 20 55 6e 75 | 73 65 64 20 7d 0d 09 09 |m; { Unu|sed }...|
|000031d0| 65 72 72 20 3a 3d 20 6e | 6f 45 72 72 3b 0d 09 09 |err := n|oErr;...|
|000031e0| 65 6e 74 72 69 65 73 20 | 3a 3d 20 48 61 6e 64 6c |entries |:= Handl|
|000031f0| 65 28 77 69 6e 64 6f 77 | 69 6e 66 6f 5b 77 74 5d |e(window|info[wt]|
|00003200| 2e 69 74 65 6d 73 5b 64 | 69 74 4c 69 73 74 5d 5e |.items[d|itList]^|
|00003210| 2e 64 61 74 61 29 3b 0d | 09 09 66 69 72 73 74 5f |.data);.|..first_|
|00003220| 65 72 72 20 3a 3d 20 6e | 6f 45 72 72 3b 0d 09 09 |err := n|oErr;...|
|00003230| 66 6f 72 20 69 20 3a 3d | 20 31 20 74 6f 20 47 65 |for i :=| 1 to Ge|
|00003240| 74 48 61 6e 64 6c 65 53 | 69 7a 65 28 65 6e 74 72 |tHandleS|ize(entr|
|00003250| 69 65 73 29 20 64 69 76 | 20 73 69 7a 65 6f 66 28 |ies) div| sizeof(|
|00003260| 49 6e 74 65 72 6e 61 6c | 41 70 70 53 70 65 63 29 |Internal|AppSpec)|
|00003270| 20 64 6f 20 62 65 67 69 | 6e 0d 09 09 09 47 65 74 | do begi|n....Get|
|00003280| 4e 74 68 45 6c 65 6d 65 | 6e 74 28 65 6e 74 72 69 |NthEleme|nt(entri|
|00003290| 65 73 2c 20 69 2c 20 61 | 70 70 73 70 65 63 29 3b |es, i, a|ppspec);|
|000032a0| 0d 09 09 09 69 66 20 6e | 6f 74 20 61 70 70 73 70 |....if n|ot appsp|
|000032b0| 65 63 2e 6c 6f 63 6b 65 | 64 20 74 68 65 6e 20 62 |ec.locke|d then b|
|000032c0| 65 67 69 6e 0d 09 09 09 | 09 65 72 72 20 3a 3d 20 |egin....|.err := |
|000032d0| 49 43 4d 61 70 45 72 72 | 28 49 43 53 65 74 50 72 |ICMapErr|(ICSetPr|
|000032e0| 65 66 28 47 65 74 49 6e | 73 74 61 6e 63 65 2c 20 |ef(GetIn|stance, |
|000032f0| 61 70 70 73 70 65 63 2e | 6b 65 79 2c 20 49 43 61 |appspec.|key, ICa|
|00003300| 74 74 72 5f 6e 6f 5f 63 | 68 61 6e 67 65 2c 20 40 |ttr_no_c|hange, @|
|00003310| 61 70 70 73 70 65 63 2e | 61 70 70 73 70 65 63 2c |appspec.|appspec,|
|00003320| 20 73 69 7a 65 6f 66 28 | 61 70 70 73 70 65 63 2e | sizeof(|appspec.|
|00003330| 61 70 70 73 70 65 63 29 | 29 29 3b 0d 09 09 09 65 |appspec)|));....e|
|00003340| 6e 64 3b 0d 09 09 09 69 | 66 20 66 69 72 73 74 5f |nd;....i|f first_|
|00003350| 65 72 72 20 3d 20 6e 6f | 45 72 72 20 74 68 65 6e |err = no|Err then|
|00003360| 20 62 65 67 69 6e 0d 09 | 09 09 09 66 69 72 73 74 | begin..|...first|
|00003370| 5f 65 72 72 20 3a 3d 20 | 65 72 72 3b 0d 09 09 09 |_err := |err;....|
|00003380| 65 6e 64 3b 20 28 2a 20 | 69 66 20 2a 29 0d 09 09 |end; (* |if *)...|
|00003390| 65 6e 64 3b 20 28 2a 20 | 66 6f 72 20 2a 29 0d 09 |end; (* |for *)..|
|000033a0| 09 65 72 72 20 3a 3d 20 | 66 69 72 73 74 5f 65 72 |.err := |first_er|
|000033b0| 72 3b 0d 09 09 57 68 61 | 74 46 6c 75 73 68 48 65 |r;...Wha|tFlushHe|
|000033c0| 6c 70 65 72 20 3a 3d 20 | 65 72 72 3b 0d 09 65 6e |lper := |err;..en|
|000033d0| 64 3b 20 28 2a 20 57 68 | 61 74 46 6c 75 73 68 48 |d; (* Wh|atFlushH|
|000033e0| 65 6c 70 65 72 20 2a 29 | 0d 0d 09 66 75 6e 63 74 |elper *)|...funct|
|000033f0| 69 6f 6e 20 57 68 61 74 | 43 6c 6f 73 65 48 65 6c |ion What|CloseHel|
|00003400| 70 65 72 20 28 77 74 3a | 20 57 69 6e 64 6f 77 54 |per (wt:| WindowT|
|00003410| 79 70 65 3b 20 69 74 65 | 6d 3a 20 69 6e 74 65 67 |ype; ite|m: integ|
|00003420| 65 72 29 3a 20 4f 53 45 | 72 72 3b 0d 09 62 65 67 |er): OSE|rr;..beg|
|00003430| 69 6e 0d 09 09 4c 44 69 | 73 70 6f 73 65 28 4c 69 |in...LDi|spose(Li|
|00003440| 73 74 48 61 6e 64 6c 65 | 28 77 69 6e 64 6f 77 69 |stHandle|(windowi|
|00003450| 6e 66 6f 5b 77 74 5d 2e | 69 74 65 6d 73 5b 69 74 |nfo[wt].|items[it|
|00003460| 65 6d 5d 5e 2e 73 70 61 | 72 65 5f 64 61 74 61 29 |em]^.spa|re_data)|
|00003470| 29 3b 0d 09 09 44 69 73 | 70 6f 73 65 48 61 6e 64 |);...Dis|poseHand|
|00003480| 6c 65 28 48 61 6e 64 6c | 65 28 77 69 6e 64 6f 77 |le(Handl|e(window|
|00003490| 69 6e 66 6f 5b 77 74 5d | 2e 69 74 65 6d 73 5b 64 |info[wt]|.items[d|
|000034a0| 69 74 4c 69 73 74 5d 5e | 2e 64 61 74 61 29 29 3b |itList]^|.data));|
|000034b0| 0d 09 09 57 68 61 74 43 | 6c 6f 73 65 48 65 6c 70 |...WhatC|loseHelp|
|000034c0| 65 72 20 3a 3d 20 6e 6f | 45 72 72 3b 0d 09 65 6e |er := no|Err;..en|
|000034d0| 64 3b 20 28 2a 20 57 68 | 61 74 43 6c 6f 73 65 48 |d; (* Wh|atCloseH|
|000034e0| 65 6c 70 65 72 20 2a 29 | 0d 0d 09 66 75 6e 63 74 |elper *)|...funct|
|000034f0| 69 6f 6e 20 57 68 61 74 | 41 63 74 69 76 61 74 65 |ion What|Activate|
|00003500| 48 65 6c 70 65 72 20 28 | 77 74 3a 20 57 69 6e 64 |Helper (|wt: Wind|
|00003510| 6f 77 54 79 70 65 3b 20 | 69 74 65 6d 3a 20 69 6e |owType; |item: in|
|00003520| 74 65 67 65 72 3b 20 61 | 63 74 69 76 61 74 65 3a |teger; a|ctivate:|
|00003530| 20 62 6f 6f 6c 65 61 6e | 29 3a 20 4f 53 45 72 72 | boolean|): OSErr|
|00003540| 3b 0d 09 62 65 67 69 6e | 0d 09 09 4c 41 63 74 69 |;..begin|...LActi|
|00003550| 76 61 74 65 28 61 63 74 | 69 76 61 74 65 2c 20 4c |vate(act|ivate, L|
|00003560| 69 73 74 48 61 6e 64 6c | 65 28 77 69 6e 64 6f 77 |istHandl|e(window|
|00003570| 69 6e 66 6f 5b 77 74 5d | 2e 69 74 65 6d 73 5b 69 |info[wt]|.items[i|
|00003580| 74 65 6d 5d 5e 2e 73 70 | 61 72 65 5f 64 61 74 61 |tem]^.sp|are_data|
|00003590| 29 29 3b 0d 09 09 57 68 | 61 74 41 63 74 69 76 61 |));...Wh|atActiva|
|000035a0| 74 65 48 65 6c 70 65 72 | 20 3a 3d 20 6e 6f 45 72 |teHelper| := noEr|
|000035b0| 72 3b 0d 09 65 6e 64 3b | 20 28 2a 20 57 68 61 74 |r;..end;| (* What|
|000035c0| 41 63 74 69 76 61 74 65 | 48 65 6c 70 65 72 20 2a |Activate|Helper *|
|000035d0| 29 0d 0d 09 66 75 6e 63 | 74 69 6f 6e 20 47 65 74 |)...func|tion Get|
|000035e0| 45 6e 74 72 79 4e 61 6d | 65 20 28 6c 69 73 74 3a |EntryNam|e (list:|
|000035f0| 20 4c 69 73 74 48 61 6e | 64 6c 65 3b 20 63 3a 20 | ListHan|dle; c: |
|00003600| 63 65 6c 6c 29 3a 20 73 | 74 72 32 35 35 3b 0d 09 |cell): s|tr255;..|
|00003610| 09 76 61 72 0d 09 09 09 | 61 70 70 73 70 65 63 3a |.var....|appspec:|
|00003620| 20 49 6e 74 65 72 6e 61 | 6c 41 70 70 53 70 65 63 | Interna|lAppSpec|
|00003630| 3b 0d 09 09 09 65 6e 74 | 72 69 65 73 3a 20 68 61 |;....ent|ries: ha|
|00003640| 6e 64 6c 65 3b 0d 09 62 | 65 67 69 6e 0d 09 09 47 |ndle;..b|egin...G|
|00003650| 65 74 45 6e 74 72 79 4e | 61 6d 65 20 3a 3d 20 27 |etEntryN|ame := '|
|00003660| 27 3b 0d 09 09 65 6e 74 | 72 69 65 73 20 3a 3d 20 |';...ent|ries := |
|00003670| 48 61 6e 64 6c 65 28 77 | 69 6e 64 6f 77 69 6e 66 |Handle(w|indowinf|
|00003680| 6f 5b 47 65 74 57 69 6e | 64 6f 77 54 79 70 65 28 |o[GetWin|dowType(|
|00003690| 6c 69 73 74 5e 5e 2e 70 | 6f 72 74 29 5d 2e 69 74 |list^^.p|ort)].it|
|000036a0| 65 6d 73 5b 64 69 74 4c | 69 73 74 5d 5e 2e 64 61 |ems[ditL|ist]^.da|
|000036b0| 74 61 29 3b 0d 09 09 47 | 65 74 4e 74 68 45 6c 65 |ta);...G|etNthEle|
|000036c0| 6d 65 6e 74 28 65 6e 74 | 72 69 65 73 2c 20 63 2e |ment(ent|ries, c.|
|000036d0| 76 20 2b 20 31 2c 20 61 | 70 70 73 70 65 63 29 3b |v + 1, a|ppspec);|
|000036e0| 0d 09 09 47 65 74 45 6e | 74 72 79 4e 61 6d 65 20 |...GetEn|tryName |
|000036f0| 3a 3d 20 63 6f 6e 63 61 | 74 28 54 50 43 6f 70 79 |:= conca|t(TPCopy|
|00003700| 28 61 70 70 73 70 65 63 | 2e 6b 65 79 2c 20 6c 65 |(appspec|.key, le|
|00003710| 6e 67 74 68 28 6b 49 43 | 48 65 6c 70 65 72 29 20 |ngth(kIC|Helper) |
|00003720| 2b 20 31 2c 20 32 35 35 | 29 2c 20 47 65 74 41 53 |+ 1, 255|), GetAS|
|00003730| 74 72 69 6e 67 28 31 32 | 38 2c 20 35 29 2c 20 61 |tring(12|8, 5), a|
|00003740| 70 70 73 70 65 63 2e 61 | 70 70 73 70 65 63 2e 6e |ppspec.a|ppspec.n|
|00003750| 61 6d 65 29 3b 0d 09 65 | 6e 64 3b 0d 0d 09 66 75 |ame);..e|nd;...fu|
|00003760| 6e 63 74 69 6f 6e 20 57 | 68 61 74 4b 65 79 48 65 |nction W|hatKeyHe|
|00003770| 6c 70 65 72 20 28 77 74 | 3a 20 57 69 6e 64 6f 77 |lper (wt|: Window|
|00003780| 54 79 70 65 3b 20 69 74 | 65 6d 3a 20 69 6e 74 65 |Type; it|em: inte|
|00003790| 67 65 72 3b 20 65 72 3a | 20 45 76 65 6e 74 52 65 |ger; er:| EventRe|
|000037a0| 63 6f 72 64 29 3a 20 4f | 53 45 72 72 3b 0d 09 09 |cord): O|SErr;...|
|000037b0| 76 61 72 0d 09 09 09 63 | 68 3a 20 69 6e 74 65 67 |var....c|h: integ|
|000037c0| 65 72 3b 0d 09 09 09 6c | 68 3a 20 4c 69 73 74 48 |er;....l|h: ListH|
|000037d0| 61 6e 64 6c 65 3b 0d 09 | 09 09 65 72 72 3a 20 4f |andle;..|..err: O|
|000037e0| 53 45 72 72 3b 0d 09 09 | 09 65 6e 74 72 69 65 73 |SErr;...|.entries|
|000037f0| 3a 20 48 61 6e 64 6c 65 | 3b 0d 09 09 09 73 65 6c |: Handle|;....sel|
|00003800| 65 63 74 69 6f 6e 3a 20 | 69 6e 74 65 67 65 72 3b |ection: |integer;|
|00003810| 0d 09 62 65 67 69 6e 0d | 09 09 65 72 72 20 3a 3d |..begin.|..err :=|
|00003820| 20 6e 6f 45 72 72 3b 0d | 09 09 69 66 20 28 65 72 | noErr;.|..if (er|
|00003830| 2e 77 68 61 74 20 3d 20 | 6b 65 79 44 6f 77 6e 29 |.what = |keyDown)|
|00003840| 20 6f 72 20 28 65 72 2e | 77 68 61 74 20 3d 20 61 | or (er.|what = a|
|00003850| 75 74 6f 4b 65 79 29 20 | 74 68 65 6e 20 62 65 67 |utoKey) |then beg|
|00003860| 69 6e 0d 09 09 09 63 68 | 20 3a 3d 20 42 41 4e 44 |in....ch| := BAND|
|00003870| 28 65 72 2e 6d 65 73 73 | 61 67 65 2c 20 24 46 46 |(er.mess|age, $FF|
|00003880| 29 3b 0d 09 09 09 63 61 | 73 65 20 63 68 20 6f 66 |);....ca|se ch of|
|00003890| 0d 09 09 09 09 63 72 43 | 68 61 72 2c 20 65 6e 74 |.....crC|har, ent|
|000038a0| 65 72 43 68 61 72 3a 20 | 20 62 65 67 69 6e 0d 09 |erChar: | begin..|
|000038b0| 09 09 09 09 69 66 20 47 | 65 74 44 43 74 6c 45 6e |....if G|etDCtlEn|
|000038c0| 61 62 6c 65 28 77 69 6e | 64 6f 77 69 6e 66 6f 5b |able(win|dowinfo[|
|000038d0| 77 74 5d 2e 77 69 6e 64 | 6f 77 2c 20 64 69 74 43 |wt].wind|ow, ditC|
|000038e0| 68 61 6e 67 65 29 20 74 | 68 65 6e 20 62 65 67 69 |hange) t|hen begi|
|000038f0| 6e 0d 09 09 09 09 09 09 | 65 6e 74 72 69 65 73 20 |n.......|entries |
|00003900| 3a 3d 20 48 61 6e 64 6c | 65 28 77 69 6e 64 6f 77 |:= Handl|e(window|
|00003910| 69 6e 66 6f 5b 77 74 5d | 2e 69 74 65 6d 73 5b 64 |info[wt]|.items[d|
|00003920| 69 74 4c 69 73 74 5d 5e | 2e 64 61 74 61 29 3b 0d |itList]^|.data);.|
|00003930| 09 09 09 09 09 09 6c 68 | 20 3a 3d 20 4c 69 73 74 |......lh| := List|
|00003940| 48 61 6e 64 6c 65 28 77 | 69 6e 64 6f 77 69 6e 66 |Handle(w|indowinf|
|00003950| 6f 5b 77 74 5d 2e 69 74 | 65 6d 73 5b 69 74 65 6d |o[wt].it|ems[item|
|00003960| 5d 5e 2e 73 70 61 72 65 | 5f 64 61 74 61 29 3b 0d |]^.spare|_data);.|
|00003970| 09 09 09 09 09 09 73 65 | 6c 65 63 74 69 6f 6e 20 |......se|lection |
|00003980| 3a 3d 20 53 65 6c 65 63 | 74 65 64 4c 69 6e 65 28 |:= Selec|tedLine(|
|00003990| 6c 68 29 3b 0d 09 09 09 | 09 09 09 46 6c 61 73 68 |lh);....|...Flash|
|000039a0| 49 74 65 6d 28 77 69 6e | 64 6f 77 69 6e 66 6f 5b |Item(win|dowinfo[|
|000039b0| 77 74 5d 2e 77 69 6e 64 | 6f 77 2c 20 64 69 74 43 |wt].wind|ow, ditC|
|000039c0| 68 61 6e 67 65 29 3b 0d | 09 09 09 09 09 09 65 72 |hange);.|......er|
|000039d0| 72 20 3a 3d 20 44 6f 43 | 68 61 6e 67 65 28 73 65 |r := DoC|hange(se|
|000039e0| 6c 65 63 74 69 6f 6e 2c | 20 65 6e 74 72 69 65 73 |lection,| entries|
|000039f0| 2c 20 6c 68 29 3b 0d 09 | 09 09 09 09 09 69 66 20 |, lh);..|.....if |
|00003a00| 65 72 72 20 3d 20 6e 6f | 45 72 72 20 74 68 65 6e |err = no|Err then|
|00003a10| 20 62 65 67 69 6e 0d 09 | 09 09 09 09 09 09 44 69 | begin..|......Di|
|00003a20| 72 74 79 44 6f 63 75 6d | 65 6e 74 3b 0d 09 09 09 |rtyDocum|ent;....|
|00003a30| 09 09 09 65 6e 64 3b 0d | 09 09 09 09 09 65 6e 64 |...end;.|.....end|
|00003a40| 3b 0d 09 09 09 09 65 6e | 64 3b 0d 09 09 09 09 6f |;.....en|d;.....o|
|00003a50| 74 68 65 72 77 69 73 65 | 20 62 65 67 69 6e 0d 09 |therwise| begin..|
|00003a60| 09 09 09 09 44 6f 4c 69 | 73 74 4b 65 79 28 4c 69 |....DoLi|stKey(Li|
|00003a70| 73 74 48 61 6e 64 6c 65 | 28 77 69 6e 64 6f 77 69 |stHandle|(windowi|
|00003a80| 6e 66 6f 5b 77 74 5d 2e | 69 74 65 6d 73 5b 69 74 |nfo[wt].|items[it|
|00003a90| 65 6d 5d 5e 2e 73 70 61 | 72 65 5f 64 61 74 61 29 |em]^.spa|re_data)|
|00003aa0| 2c 20 65 72 2c 20 47 65 | 74 45 6e 74 72 79 4e 61 |, er, Ge|tEntryNa|
|00003ab0| 6d 65 29 3b 0d 09 09 09 | 09 09 44 69 6d 42 75 74 |me);....|..DimBut|
|00003ac0| 74 6f 6e 73 28 77 74 29 | 3b 0d 09 09 09 09 65 6e |tons(wt)|;.....en|
|00003ad0| 64 3b 0d 09 09 09 65 6e | 64 3b 0d 09 09 65 6e 64 |d;....en|d;...end|
|00003ae0| 3b 0d 09 09 57 68 61 74 | 4b 65 79 48 65 6c 70 65 |;...What|KeyHelpe|
|00003af0| 72 20 3a 3d 20 65 72 72 | 3b 0d 09 65 6e 64 3b 20 |r := err|;..end; |
|00003b00| 28 2a 20 57 68 61 74 4b | 65 79 48 65 6c 70 65 72 |(* WhatK|eyHelper|
|00003b10| 20 2a 29 0d 0d 09 66 75 | 6e 63 74 69 6f 6e 20 57 | *)...fu|nction W|
|00003b20| 68 61 74 43 75 72 73 6f | 72 48 65 6c 70 65 72 20 |hatCurso|rHelper |
|00003b30| 28 77 74 3a 20 57 69 6e | 64 6f 77 54 79 70 65 3b |(wt: Win|dowType;|
|00003b40| 20 69 74 65 6d 3a 20 69 | 6e 74 65 67 65 72 3b 20 | item: i|nteger; |
|00003b50| 70 74 3a 20 50 6f 69 6e | 74 3b 20 63 75 72 73 6f |pt: Poin|t; curso|
|00003b60| 72 69 64 3a 20 69 6e 74 | 65 67 65 72 29 3a 20 4f |rid: int|eger): O|
|00003b70| 53 45 72 72 3b 0d 09 09 | 76 61 72 0d 09 09 09 72 |SErr;...|var....r|
|00003b80| 3a 20 52 65 63 74 3b 0d | 09 62 65 67 69 6e 0d 09 |: Rect;.|.begin..|
|00003b90| 09 47 65 74 44 49 74 65 | 6d 52 65 63 74 28 77 69 |.GetDIte|mRect(wi|
|00003ba0| 6e 64 6f 77 69 6e 66 6f | 5b 77 74 5d 2e 77 69 6e |ndowinfo|[wt].win|
|00003bb0| 64 6f 77 2c 20 69 74 65 | 6d 2c 20 72 29 3b 0d 09 |dow, ite|m, r);..|
|00003bc0| 09 49 6e 73 65 74 52 65 | 63 74 28 72 2c 20 31 35 |.InsetRe|ct(r, 15|
|00003bd0| 2c 20 30 29 3b 0d 09 09 | 69 66 20 50 74 49 6e 52 |, 0);...|if PtInR|
|00003be0| 65 63 74 28 70 74 2c 20 | 72 29 20 74 68 65 6e 20 |ect(pt, |r) then |
|00003bf0| 62 65 67 69 6e 0d 09 09 | 09 53 65 74 43 75 72 73 |begin...|.SetCurs|
|00003c00| 6f 72 28 47 65 74 43 75 | 72 73 6f 72 28 63 75 72 |or(GetCu|rsor(cur|
|00003c10| 73 6f 72 69 64 29 5e 5e | 29 3b 0d 09 09 65 6e 64 |sorid)^^|);...end|
|00003c20| 20 65 6c 73 65 20 62 65 | 67 69 6e 0d 09 09 09 49 | else be|gin....I|
|00003c30| 6e 69 74 43 75 72 73 6f | 72 3b 0d 09 09 65 6e 64 |nitCurso|r;...end|
|00003c40| 3b 20 28 2a 20 69 66 20 | 2a 29 0d 09 09 57 68 61 |; (* if |*)...Wha|
|00003c50| 74 43 75 72 73 6f 72 48 | 65 6c 70 65 72 20 3a 3d |tCursorH|elper :=|
|00003c60| 20 6e 6f 45 72 72 3b 0d | 09 65 6e 64 3b 20 28 2a | noErr;.|.end; (*|
|00003c70| 20 57 68 61 74 43 75 72 | 73 6f 72 48 65 6c 70 65 | WhatCur|sorHelpe|
|00003c80| 72 20 2a 29 0d 0d 09 70 | 72 6f 63 65 64 75 72 65 |r *)...p|rocedure|
|00003c90| 20 48 65 6c 70 65 72 53 | 65 74 53 65 6c 65 63 74 | HelperS|etSelect|
|00003ca0| 69 6f 6e 28 6b 65 79 3a | 53 74 72 32 35 35 29 3b |ion(key:|Str255);|
|00003cb0| 0d 09 09 76 61 72 0d 09 | 09 09 69 3a 6c 6f 6e 67 |...var..|..i:long|
|00003cc0| 49 6e 74 3b 0d 09 09 09 | 77 69 6e 64 6f 77 3a 57 |Int;....|window:W|
|00003cd0| 69 6e 64 6f 77 50 74 72 | 3b 0d 09 09 09 65 6e 74 |indowPtr|;....ent|
|00003ce0| 72 69 65 73 3a 48 61 6e | 64 6c 65 3b 0d 09 09 09 |ries:Han|dle;....|
|00003cf0| 61 70 70 73 70 65 63 3a | 49 6e 74 65 72 6e 61 6c |appspec:|Internal|
|00003d00| 41 70 70 53 70 65 63 3b | 0d 09 09 09 65 72 72 3a |AppSpec;|....err:|
|00003d10| 4f 53 53 74 61 74 75 73 | 3b 0d 09 09 09 6c 69 73 |OSStatus|;....lis|
|00003d20| 74 3a 4c 69 73 74 48 61 | 6e 64 6c 65 3b 0d 09 62 |t:ListHa|ndle;..b|
|00003d30| 65 67 69 6e 0d 09 09 6b | 65 79 20 3a 3d 20 63 6f |egin...k|ey := co|
|00003d40| 6e 63 61 74 28 6b 49 43 | 48 65 6c 70 65 72 2c 6b |ncat(kIC|Helper,k|
|00003d50| 65 79 29 3b 0d 09 09 77 | 69 6e 64 6f 77 20 3a 3d |ey);...w|indow :=|
|00003d60| 20 47 65 74 57 69 6e 64 | 6f 77 50 74 72 28 57 54 | GetWind|owPtr(WT|
|00003d70| 5f 48 65 6c 70 65 72 29 | 3b 0d 09 09 69 66 20 77 |_Helper)|;...if w|
|00003d80| 69 6e 64 6f 77 20 3c 3e | 20 6e 69 6c 20 74 68 65 |indow <>| nil the|
|00003d90| 6e 20 62 65 67 69 6e 0d | 09 09 09 6c 69 73 74 20 |n begin.|...list |
|00003da0| 3a 3d 20 4c 69 73 74 48 | 61 6e 64 6c 65 28 77 69 |:= ListH|andle(wi|
|00003db0| 6e 64 6f 77 69 6e 66 6f | 5b 57 54 5f 48 65 6c 70 |ndowinfo|[WT_Help|
|00003dc0| 65 72 5d 2e 69 74 65 6d | 73 5b 64 69 74 4c 69 73 |er].item|s[ditLis|
|00003dd0| 74 5d 5e 2e 73 70 61 72 | 65 5f 64 61 74 61 29 3b |t]^.spar|e_data);|
|00003de0| 0d 09 09 09 65 6e 74 72 | 69 65 73 20 3a 3d 20 48 |....entr|ies := H|
|00003df0| 61 6e 64 6c 65 28 77 69 | 6e 64 6f 77 69 6e 66 6f |andle(wi|ndowinfo|
|00003e00| 5b 57 54 5f 48 65 6c 70 | 65 72 5d 2e 69 74 65 6d |[WT_Help|er].item|
|00003e10| 73 5b 64 69 74 4c 69 73 | 74 5d 5e 2e 64 61 74 61 |s[ditLis|t]^.data|
|00003e20| 29 3b 0d 09 09 09 66 6f | 72 20 69 20 3a 3d 20 31 |);....fo|r i := 1|
|00003e30| 20 74 6f 20 47 65 74 48 | 61 6e 64 6c 65 53 69 7a | to GetH|andleSiz|
|00003e40| 65 28 65 6e 74 72 69 65 | 73 29 20 64 69 76 20 73 |e(entrie|s) div s|
|00003e50| 69 7a 65 6f 66 28 49 6e | 74 65 72 6e 61 6c 41 70 |izeof(In|ternalAp|
|00003e60| 70 53 70 65 63 29 20 64 | 6f 20 62 65 67 69 6e 0d |pSpec) d|o begin.|
|00003e70| 09 09 09 09 47 65 74 4e | 74 68 45 6c 65 6d 65 6e |....GetN|thElemen|
|00003e80| 74 28 65 6e 74 72 69 65 | 73 2c 20 69 2c 20 61 70 |t(entrie|s, i, ap|
|00003e90| 70 73 70 65 63 29 3b 0d | 09 09 09 09 69 66 20 49 |pspec);.|....if I|
|00003ea0| 55 45 71 75 61 6c 53 74 | 72 69 6e 67 28 61 70 70 |UEqualSt|ring(app|
|00003eb0| 73 70 65 63 2e 6b 65 79 | 2c 20 6b 65 79 29 20 3d |spec.key|, key) =|
|00003ec0| 20 30 20 74 68 65 6e 20 | 62 65 67 69 6e 0d 09 09 | 0 then |begin...|
|00003ed0| 09 09 09 4c 53 65 74 53 | 69 6e 67 6c 65 53 65 6c |...LSetS|ingleSel|
|00003ee0| 65 63 74 69 6f 6e 28 6c | 69 73 74 2c 20 69 20 2d |ection(l|ist, i -|
|00003ef0| 20 31 29 3b 0d 09 09 09 | 09 09 44 69 6d 42 75 74 | 1);....|..DimBut|
|00003f00| 74 6f 6e 73 28 57 54 5f | 48 65 6c 70 65 72 29 3b |tons(WT_|Helper);|
|00003f10| 0d 09 09 09 09 09 69 66 | 20 47 65 74 44 43 74 6c |......if| GetDCtl|
|00003f20| 45 6e 61 62 6c 65 28 77 | 69 6e 64 6f 77 2c 20 64 |Enable(w|indow, d|
|00003f30| 69 74 43 68 61 6e 67 65 | 29 20 74 68 65 6e 20 62 |itChange|) then b|
|00003f40| 65 67 69 6e 0d 09 09 09 | 09 09 09 65 72 72 20 3a |egin....|...err :|
|00003f50| 3d 20 44 6f 43 68 61 6e | 67 65 28 69 20 2d 20 31 |= DoChan|ge(i - 1|
|00003f60| 2c 20 65 6e 74 72 69 65 | 73 2c 20 6c 69 73 74 29 |, entrie|s, list)|
|00003f70| 3b 0d 09 09 09 09 09 65 | 6e 64 3b 0d 09 09 09 09 |;......e|nd;.....|
|00003f80| 09 6c 65 61 76 65 3b 0d | 09 09 09 09 65 6e 64 3b |.leave;.|....end;|
|00003f90| 0d 09 09 09 65 6e 64 3b | 0d 09 09 65 6e 64 3b 0d |....end;|...end;.|
|00003fa0| 09 65 6e 64 3b 0d 09 0d | 65 6e 64 2e 20 28 2a 20 |.end;...|end. (* |
|00003fb0| 49 43 48 65 6c 70 65 72 | 57 68 61 74 20 2a 29 0d |ICHelper|What *).|
|00003fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004000| 00 00 01 00 00 00 01 76 | 00 00 00 76 00 00 00 52 |.......v|...v...R|
|00004010| ff ff ff ff ff 00 00 00 | 40 7f fc 90 0a 90 69 90 |........|@.....i.|
|00004020| 09 8f f1 80 01 9f f9 a0 | 05 a0 05 a0 05 a0 05 a0 |........|........|
|00004030| 0e 49 43 48 65 6c 70 65 | 72 57 68 61 74 2e 70 49 |.ICHelpe|rWhat.pI|
|00004040| 02 00 00 00 54 45 58 54 | 43 57 49 45 00 00 00 9c |....TEXT|CWIE....|
|00004050| 00 00 54 45 58 54 43 57 | 49 45 00 00 00 9c 00 00 |..TEXTCW|IE......|
|00004060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004070| 00 00 aa ff 95 03 00 00 | 3f 40 00 00 01 c8 00 01 |........|?@......|
|00004080| 00 03 80 07 c0 0f e0 1f | f0 3f f8 7f fc ff fe 7f |........|.?......|
|00004090| fe 3f fe 1f fe 0f fe 07 | c6 03 80 01 00 00 00 00 |.?......|........|
|000040a0| 40 00 00 00 00 00 00 00 | 00 00 00 7f fe 80 01 80 |@.......|........|
|000040b0| 01 a0 01 80 01 7f fe 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040c0| 00 00 00 00 00 00 00 00 | 00 00 00 7f fe ff ff ff |........|........|
|000040d0| ff ff ff ff ff 7f fe 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040e0| 00 00 00 00 40 00 00 00 | 00 3c 00 42 f0 ff 9e 80 |....@...|.<.B....|
|000040f0| 91 80 91 81 f9 81 09 81 | 69 81 69 81 f9 80 91 80 |........|i.i.....|
|00004100| 00 00 00 1e 00 2a 00 24 | 01 d1 02 20 00 2a 00 24 |.....*.$|... .*.$|
|00004110| 01 6b 01 5b 00 00 27 f7 | 00 00 00 00 00 00 00 00 |.k.[..'.|........|
|00004120| 00 00 00 00 00 48 00 09 | 47 65 6e 65 76 61 00 00 |.....H..|Geneva..|
|00004130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004140| 00 00 00 00 00 00 00 00 | 00 03 00 02 00 52 00 09 |........|.....R..|
|00004150| 01 d0 02 68 00 52 00 09 | 01 d0 02 68 ae 16 af 18 |...h.R..|...h....|
|00004160| 00 00 26 25 00 00 26 2b | 00 00 24 fa 01 00 00 00 |..&%..&+|..$.....|
|00004170| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 76 00 00 |........|.....v..|
|00004180| 00 76 00 00 00 52 00 5c | be d4 13 d6 00 00 00 1c |.v...R.\|........|
|00004190| 00 52 00 01 4d 50 53 52 | 00 01 00 12 4d 57 42 42 |.R..MPSR|....MWBB|
|000041a0| 00 00 00 2a 03 f0 ff ff | 00 00 00 00 00 00 00 00 |...*....|........|
|000041b0| 03 ed ff ff 00 00 00 22 | 00 00 00 00 03 f0 ff ff |......."|........|
|000041c0| 00 00 00 6e 00 00 00 00 | 00 00 00 00 00 00 00 00 |...n....|........|
|000041d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+