home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-10-14 | 10.1 KB | [TEXT/MMCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MMCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 05 41 70 70 2e 63 00 | 00 00 00 00 00 00 00 00 |..App.c.|........|
|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 4d 4d 43 | 43 01 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 23 6b 00 | 00 04 20 aa c4 9b 27 aa |.....#k.|.. ...'.|
|00000060| c4 9b 27 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 f2 11 00 00 |........|........|
|00000080| 2f 2f 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |//------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000c0| 2d 2d 2d 2d 2d 2d 2d 0d | 2f 2f 2d 2d 2d 2d 2d 2d |-------.|//------|
|000000d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000100| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|00000110| 2f 2f 0d 2f 2f 09 48 6f | 72 72 69 62 6c 65 20 52 |//.//.Ho|rrible R|
|00000120| 69 63 6b 65 74 79 20 53 | 68 65 6c 6c 2c 20 62 79 |ickety S|hell, by|
|00000130| 20 44 61 76 65 20 4a 6f | 68 6e 73 6f 6e 0d 2f 2f | Dave Jo|hnson.//|
|00000140| 0d 2f 2f 09 a9 20 43 6f | 70 79 72 69 67 68 74 20 |.//.. Co|pyright |
|00000150| 31 39 38 35 20 2d 20 31 | 39 39 34 20 41 6e 79 6f |1985 - 1|994 Anyo|
|00000160| 6e 65 20 57 68 6f 20 57 | 61 6e 74 73 20 49 74 2c |ne Who W|ants It,|
|00000170| 0d 2f 2f 09 41 6c 6c 20 | 52 69 67 68 74 73 20 45 |.//.All |Rights E|
|00000180| 6e 65 72 67 65 74 69 63 | 61 6c 6c 79 20 48 65 61 |nergetic|ally Hea|
|00000190| 76 65 64 20 61 73 20 66 | 61 72 20 61 77 61 79 20 |ved as f|ar away |
|000001a0| 66 72 6f 6d 20 6d 65 20 | 61 73 20 70 6f 73 73 69 |from me |as possi|
|000001b0| 62 6c 65 2e 0d 2f 2f 09 | 55 73 65 20 61 74 20 79 |ble..//.|Use at y|
|000001c0| 6f 75 72 20 6f 77 6e 20 | 28 63 6f 6e 73 69 64 65 |our own |(conside|
|000001d0| 72 61 62 6c 65 29 20 72 | 69 73 6b 2e 0d 0d 0d 23 |rable) r|isk....#|
|000001e0| 69 6e 63 6c 75 64 65 20 | 22 41 70 70 49 6e 74 65 |include |"AppInte|
|000001f0| 72 66 61 63 65 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |rface.h"|.#includ|
|00000200| 65 20 3c 47 65 73 74 61 | 6c 74 45 71 75 2e 68 3e |e <Gesta|ltEqu.h>|
|00000210| 0d 0d 2f 2a 20 54 68 65 | 20 74 77 6f 20 73 68 65 |../* The| two she|
|00000220| 6c 6c 20 67 6c 6f 62 61 | 6c 73 20 77 65 20 6e 65 |ll globa|ls we ne|
|00000230| 65 64 20 2a 2f 0d 65 78 | 74 65 72 6e 20 4d 65 6e |ed */.ex|tern Men|
|00000240| 75 48 61 6e 64 6c 65 09 | 67 53 68 65 6c 6c 4d 65 |uHandle.|gShellMe|
|00000250| 6e 75 48 61 6e 64 6c 65 | 73 5b 5d 3b 0d 65 78 74 |nuHandle|s[];.ext|
|00000260| 65 72 6e 20 42 6f 6f 6c | 65 61 6e 09 09 67 44 6f |ern Bool|ean..gDo|
|00000270| 6e 65 46 6c 61 67 3b 0d | 0d 2f 2f 2f 2f 2f 2f 2f |neFlag;.|.///////|
|00000280| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 0d 2f 2f 20 43 6f 6e |////////|/.// Con|
|00000290| 73 74 61 6e 74 73 0d 0d | 23 64 65 66 69 6e 65 20 |stants..|#define |
|000002a0| 6b 42 61 74 63 68 4d 65 | 6e 75 49 44 09 09 31 33 |kBatchMe|nuID..13|
|000002b0| 31 0d 09 23 64 65 66 69 | 6e 65 09 69 42 61 74 63 |1..#defi|ne.iBatc|
|000002c0| 68 09 09 09 31 0d 0d 2f | 2f 2f 2f 2f 2f 2f 2f 2f |h...1../|////////|
|000002d0| 2f 2f 2f 2f 2f 2f 2f 0d | 2f 2f 20 47 6c 6f 62 61 |///////.|// Globa|
|000002e0| 6c 73 0d 0d 57 69 6e 64 | 6f 77 52 65 63 6f 72 64 |ls..Wind|owRecord|
|000002f0| 09 09 67 57 53 74 6f 72 | 65 3b 0d 57 69 6e 64 6f |..gWStor|e;.Windo|
|00000300| 77 50 74 72 20 09 09 09 | 67 57 69 6e 64 6f 77 20 |wPtr ...|gWindow |
|00000310| 3d 20 6e 69 6c 3b 0d 4d | 65 6e 75 48 61 6e 64 6c |= nil;.M|enuHandl|
|00000320| 65 09 09 09 67 42 61 74 | 63 68 4d 65 6e 75 48 6e |e...gBat|chMenuHn|
|00000330| 64 6c 20 3d 20 6e 69 6c | 3b 0d 0d 2f 2f 20 50 72 |dl = nil|;..// Pr|
|00000340| 6f 74 6f 73 20 66 6f 72 | 20 53 65 6c 65 63 74 46 |otos for| SelectF|
|00000350| 6f 6c 64 65 72 0d 76 6f | 69 64 20 49 6e 69 74 53 |older.vo|id InitS|
|00000360| 65 6c 65 63 74 46 6f 6c | 64 65 72 28 76 6f 69 64 |electFol|der(void|
|00000370| 29 3b 0d 0d 0d 2f 2f 20 | 41 6e 20 41 70 70 6c 65 |);...// |An Apple|
|00000380| 20 45 76 65 6e 74 20 73 | 75 70 70 6f 72 74 20 72 | Event s|upport r|
|00000390| 6f 75 74 69 6e 65 0d 4f | 53 45 72 72 09 4d 79 47 |outine.O|SErr.MyG|
|000003a0| 6f 74 52 65 71 75 69 72 | 65 64 50 61 72 61 6d 73 |otRequir|edParams|
|000003b0| 20 28 41 70 70 6c 65 45 | 76 65 6e 74 20 2a 74 68 | (AppleE|vent *th|
|000003c0| 65 41 45 76 65 6e 74 29 | 3b 0d 0d 2f 2a 20 20 41 |eAEvent)|;../* A|
|000003d0| 20 63 68 61 6e 63 65 20 | 74 6f 20 70 72 65 2d 68 | chance |to pre-h|
|000003e0| 61 6e 64 6c 65 20 61 6e | 20 65 76 65 6e 74 20 2a |andle an| event *|
|000003f0| 2f 0d 42 6f 6f 6c 65 61 | 6e 20 41 70 70 44 6f 45 |/.Boolea|n AppDoE|
|00000400| 76 65 6e 74 28 45 76 65 | 6e 74 52 65 63 6f 72 64 |vent(Eve|ntRecord|
|00000410| 20 2a 65 76 65 6e 74 29 | 0d 7b 0d 09 42 6f 6f 6c | *event)|.{..Bool|
|00000420| 65 61 6e 09 09 68 61 6e | 64 6c 65 64 20 3d 20 66 |ean..han|dled = f|
|00000430| 61 6c 73 65 3b 0d 09 0d | 09 2f 2f 20 44 6f 20 53 |alse;...|.// Do S|
|00000440| 74 75 66 66 0d 09 72 65 | 74 75 72 6e 20 68 61 6e |tuff..re|turn han|
|00000450| 64 6c 65 64 3b 0d 7d 0d | 0d 2f 2a 20 43 61 6c 6c |dled;.}.|./* Call|
|00000460| 65 64 20 62 79 20 74 68 | 65 20 53 68 65 6c 6c 20 |ed by th|e Shell |
|00000470| 61 74 20 73 74 61 72 74 | 75 70 20 74 69 6d 65 20 |at start|up time |
|00000480| 2a 2f 0d 42 6f 6f 6c 65 | 61 6e 20 41 70 70 49 6e |*/.Boole|an AppIn|
|00000490| 69 74 28 76 6f 69 64 29 | 20 09 2f 2a 20 72 65 74 |it(void)| ./* ret|
|000004a0| 75 72 6e 73 20 66 61 6c | 73 65 20 69 66 20 69 6e |urns fal|se if in|
|000004b0| 69 74 69 61 6c 69 7a 61 | 74 69 6f 6e 20 66 61 69 |itializa|tion fai|
|000004c0| 6c 73 20 2a 2f 0d 7b 0d | 09 52 65 63 74 09 09 74 |ls */.{.|.Rect..t|
|000004d0| 65 6d 70 52 65 63 74 20 | 3d 20 7b 30 2c 20 30 2c |empRect |= {0, 0,|
|000004e0| 20 33 30 30 2c 20 33 30 | 30 7d 3b 0d 09 6c 6f 6e | 300, 30|0};..lon|
|000004f0| 67 09 09 67 65 73 74 61 | 6c 74 52 65 73 70 6f 6e |g..gesta|ltRespon|
|00000500| 73 65 3b 0d 09 4f 53 45 | 72 72 09 09 65 72 72 3b |se;..OSE|rr..err;|
|00000510| 0d 09 0d 09 2f 2f 20 43 | 68 65 63 6b 20 66 6f 72 |....// C|heck for|
|00000520| 20 41 70 70 6c 65 20 45 | 76 65 6e 74 20 4d 61 6e | Apple E|vent Man|
|00000530| 61 67 65 72 0d 09 65 72 | 72 20 3d 20 47 65 73 74 |ager..er|r = Gest|
|00000540| 61 6c 74 28 67 65 73 74 | 61 6c 74 41 70 70 6c 65 |alt(gest|altApple|
|00000550| 45 76 65 6e 74 73 41 74 | 74 72 2c 20 26 67 65 73 |EventsAt|tr, &ges|
|00000560| 74 61 6c 74 52 65 73 70 | 6f 6e 73 65 29 3b 0d 09 |taltResp|onse);..|
|00000570| 69 66 28 20 65 72 72 20 | 21 3d 20 6e 6f 45 72 72 |if( err |!= noErr|
|00000580| 20 7c 7c 20 21 28 67 65 | 73 74 61 6c 74 52 65 73 | || !(ge|staltRes|
|00000590| 70 6f 6e 73 65 20 26 20 | 28 31 4c 20 3e 3e 20 67 |ponse & |(1L >> g|
|000005a0| 65 73 74 61 6c 74 41 70 | 70 6c 65 45 76 65 6e 74 |estaltAp|pleEvent|
|000005b0| 73 50 72 65 73 65 6e 74 | 29 29 20 29 0d 09 09 72 |sPresent|)) )...r|
|000005c0| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0d 09 0d 20 |eturn fa|lse;... |
|000005d0| 09 2f 2f 20 47 65 74 20 | 74 68 65 20 6d 65 6e 75 |.// Get |the menu|
|000005e0| 2c 20 64 72 61 77 20 6d | 65 6e 75 20 62 61 72 0d |, draw m|enu bar.|
|000005f0| 09 67 42 61 74 63 68 4d | 65 6e 75 48 6e 64 6c 20 |.gBatchM|enuHndl |
|00000600| 3d 20 47 65 74 4d 65 6e | 75 28 6b 42 61 74 63 68 |= GetMen|u(kBatch|
|00000610| 4d 65 6e 75 49 44 29 3b | 0d 09 69 66 28 67 42 61 |MenuID);|..if(gBa|
|00000620| 74 63 68 4d 65 6e 75 48 | 6e 64 6c 20 3d 3d 20 6e |tchMenuH|ndl == n|
|00000630| 69 6c 29 0d 09 09 72 65 | 74 75 72 6e 20 66 61 6c |il)...re|turn fal|
|00000640| 73 65 3b 0d 09 28 2a 67 | 42 61 74 63 68 4d 65 6e |se;..(*g|BatchMen|
|00000650| 75 48 6e 64 6c 29 2d 3e | 6d 65 6e 75 49 44 20 3d |uHndl)->|menuID =|
|00000660| 20 6b 42 61 74 63 68 4d | 65 6e 75 49 44 3b 0d 09 | kBatchM|enuID;..|
|00000670| 49 6e 73 65 72 74 4d 65 | 6e 75 28 67 42 61 74 63 |InsertMe|nu(gBatc|
|00000680| 68 4d 65 6e 75 48 6e 64 | 6c 2c 20 30 29 3b 0d 0d |hMenuHnd|l, 0);..|
|00000690| 09 44 72 61 77 4d 65 6e | 75 42 61 72 28 29 3b 0d |.DrawMen|uBar();.|
|000006a0| 0d 09 2f 2f 20 49 6e 73 | 74 61 6c 6c 20 74 68 65 |..// Ins|tall the|
|000006b0| 20 41 70 70 6c 65 20 45 | 76 65 6e 74 20 48 61 6e | Apple E|vent Han|
|000006c0| 64 6c 65 72 73 0d 09 65 | 72 72 20 3d 20 41 45 49 |dlers..e|rr = AEI|
|000006d0| 6e 73 74 61 6c 6c 45 76 | 65 6e 74 48 61 6e 64 6c |nstallEv|entHandl|
|000006e0| 65 72 28 6b 43 6f 72 65 | 45 76 65 6e 74 43 6c 61 |er(kCore|EventCla|
|000006f0| 73 73 2c 20 6b 41 45 4f | 70 65 6e 41 70 70 6c 69 |ss, kAEO|penAppli|
|00000700| 63 61 74 69 6f 6e 2c 20 | 26 41 70 70 4f 41 50 50 |cation, |&AppOAPP|
|00000710| 48 61 6e 64 6c 65 72 2c | 20 30 2c 20 46 41 4c 53 |Handler,| 0, FALS|
|00000720| 45 29 3b 0d 09 69 66 28 | 65 72 72 20 21 3d 20 6e |E);..if(|err != n|
|00000730| 6f 45 72 72 29 0d 09 09 | 72 65 74 75 72 6e 20 66 |oErr)...|return f|
|00000740| 61 6c 73 65 3b 0d 20 09 | 65 72 72 20 3d 20 41 45 |alse;. .|err = AE|
|00000750| 49 6e 73 74 61 6c 6c 45 | 76 65 6e 74 48 61 6e 64 |InstallE|ventHand|
|00000760| 6c 65 72 28 6b 43 6f 72 | 65 45 76 65 6e 74 43 6c |ler(kCor|eEventCl|
|00000770| 61 73 73 2c 20 6b 41 45 | 4f 70 65 6e 44 6f 63 75 |ass, kAE|OpenDocu|
|00000780| 6d 65 6e 74 73 2c 20 26 | 41 70 70 4f 44 4f 43 48 |ments, &|AppODOCH|
|00000790| 61 6e 64 6c 65 72 2c 20 | 30 2c 20 46 41 4c 53 45 |andler, |0, FALSE|
|000007a0| 29 3b 0d 09 69 66 28 65 | 72 72 20 21 3d 20 6e 6f |);..if(e|rr != no|
|000007b0| 45 72 72 29 0d 09 09 72 | 65 74 75 72 6e 20 66 61 |Err)...r|eturn fa|
|000007c0| 6c 73 65 3b 0d 09 65 72 | 72 20 3d 20 41 45 49 6e |lse;..er|r = AEIn|
|000007d0| 73 74 61 6c 6c 45 76 65 | 6e 74 48 61 6e 64 6c 65 |stallEve|ntHandle|
|000007e0| 72 28 6b 43 6f 72 65 45 | 76 65 6e 74 43 6c 61 73 |r(kCoreE|ventClas|
|000007f0| 73 2c 20 6b 41 45 50 72 | 69 6e 74 44 6f 63 75 6d |s, kAEPr|intDocum|
|00000800| 65 6e 74 73 2c 20 26 41 | 70 70 50 44 4f 43 48 61 |ents, &A|ppPDOCHa|
|00000810| 6e 64 6c 65 72 2c 20 30 | 2c 20 46 41 4c 53 45 29 |ndler, 0|, FALSE)|
|00000820| 3b 0d 09 69 66 28 65 72 | 72 20 21 3d 20 6e 6f 45 |;..if(er|r != noE|
|00000830| 72 72 29 0d 09 09 72 65 | 74 75 72 6e 20 66 61 6c |rr)...re|turn fal|
|00000840| 73 65 3b 0d 09 65 72 72 | 20 3d 20 41 45 49 6e 73 |se;..err| = AEIns|
|00000850| 74 61 6c 6c 45 76 65 6e | 74 48 61 6e 64 6c 65 72 |tallEven|tHandler|
|00000860| 28 6b 43 6f 72 65 45 76 | 65 6e 74 43 6c 61 73 73 |(kCoreEv|entClass|
|00000870| 2c 20 6b 41 45 51 75 69 | 74 41 70 70 6c 69 63 61 |, kAEQui|tApplica|
|00000880| 74 69 6f 6e 2c 20 26 41 | 70 70 51 55 49 54 48 61 |tion, &A|ppQUITHa|
|00000890| 6e 64 6c 65 72 2c 20 30 | 2c 20 46 41 4c 53 45 29 |ndler, 0|, FALSE)|
|000008a0| 3b 0d 09 69 66 28 65 72 | 72 20 21 3d 20 6e 6f 45 |;..if(er|r != noE|
|000008b0| 72 72 29 0d 09 09 72 65 | 74 75 72 6e 20 66 61 6c |rr)...re|turn fal|
|000008c0| 73 65 3b 0d 09 0d 09 2f | 2f 20 49 6e 69 74 69 61 |se;..../|/ Initia|
|000008d0| 6c 69 7a 65 20 74 68 65 | 20 73 65 6c 65 63 74 20 |lize the| select |
|000008e0| 66 6f 6c 64 65 72 20 73 | 74 75 66 66 0d 09 49 6e |folder s|tuff..In|
|000008f0| 69 74 53 65 6c 65 63 74 | 46 6f 6c 64 65 72 28 29 |itSelect|Folder()|
|00000900| 3b 0d 0d 09 2f 2f 20 42 | 75 69 6c 64 20 61 20 77 |;...// B|uild a w|
|00000910| 69 6e 64 6f 77 2c 20 69 | 6e 76 69 73 69 62 6c 65 |indow, i|nvisible|
|00000920| 0d 09 4f 66 66 73 65 74 | 52 65 63 74 28 26 74 65 |..Offset|Rect(&te|
|00000930| 6d 70 52 65 63 74 2c 20 | 32 30 2c 20 47 65 74 4d |mpRect, |20, GetM|
|00000940| 42 61 72 48 65 69 67 68 | 74 28 29 20 2b 20 33 30 |BarHeigh|t() + 30|
|00000950| 29 3b 0d 09 67 57 69 6e | 64 6f 77 20 3d 20 4e 65 |);..gWin|dow = Ne|
|00000960| 77 43 57 69 6e 64 6f 77 | 28 26 67 57 53 74 6f 72 |wCWindow|(&gWStor|
|00000970| 65 2c 20 26 74 65 6d 70 | 52 65 63 74 2c 20 22 5c |e, &temp|Rect, "\|
|00000980| 70 41 20 57 69 6e 64 6f | 77 22 2c 20 66 61 6c 73 |pA Windo|w", fals|
|00000990| 65 2c 0d 09 09 09 09 09 | 09 64 6f 63 75 6d 65 6e |e,......|.documen|
|000009a0| 74 50 72 6f 63 2c 20 28 | 57 69 6e 64 6f 77 50 74 |tProc, (|WindowPt|
|000009b0| 72 29 28 2d 31 29 2c 20 | 74 72 75 65 2c 20 6e 69 |r)(-1), |true, ni|
|000009c0| 6c 29 3b 0d 09 0d 09 72 | 65 74 75 72 6e 20 28 67 |l);....r|eturn (g|
|000009d0| 57 69 6e 64 6f 77 20 21 | 3d 20 6e 69 6c 29 3b 0d |Window !|= nil);.|
|000009e0| 7d 0d 0d 2f 2a 20 43 61 | 6c 6c 65 64 20 77 68 65 |}../* Ca|lled whe|
|000009f0| 6e 20 74 68 65 20 73 68 | 65 6c 6c 20 72 65 63 65 |n the sh|ell rece|
|00000a00| 69 76 65 73 20 61 6e 20 | 41 63 74 69 76 61 74 65 |ives an |Activate|
|00000a10| 20 65 76 65 6e 74 2e 20 | 2a 2f 0d 76 6f 69 64 20 | event. |*/.void |
|00000a20| 41 70 70 41 63 74 69 76 | 61 74 65 28 57 69 6e 64 |AppActiv|ate(Wind|
|00000a30| 6f 77 50 74 72 20 77 69 | 6e 64 2c 20 42 6f 6f 6c |owPtr wi|nd, Bool|
|00000a40| 65 61 6e 20 61 63 74 69 | 76 61 74 65 29 0d 7b 0d |ean acti|vate).{.|
|00000a50| 7d 0d 0d 2f 2a 20 43 61 | 6c 6c 65 64 20 77 68 65 |}../* Ca|lled whe|
|00000a60| 6e 20 61 20 77 69 6e 64 | 6f 77 20 6e 65 65 64 73 |n a wind|ow needs|
|00000a70| 20 75 70 64 61 74 69 6e | 67 2e 20 42 65 67 69 6e | updatin|g. Begin|
|00000a80| 55 70 64 61 74 65 28 29 | 20 68 61 73 20 61 6c 72 |Update()| has alr|
|00000a90| 65 61 64 79 20 62 65 65 | 6e 20 63 61 6c 6c 65 64 |eady bee|n called|
|00000aa0| 2c 20 61 6e 64 20 74 68 | 65 20 0d 70 6f 72 74 20 |, and th|e .port |
|00000ab0| 69 73 20 73 65 74 20 74 | 6f 20 74 68 65 20 61 70 |is set t|o the ap|
|00000ac0| 70 72 6f 70 72 69 61 74 | 65 20 77 69 6e 64 6f 77 |propriat|e window|
|00000ad0| 20 2a 2f 0d 76 6f 69 64 | 20 41 70 70 55 70 64 61 | */.void| AppUpda|
|00000ae0| 74 65 28 45 76 65 6e 74 | 52 65 63 6f 72 64 20 2a |te(Event|Record *|
|00000af0| 65 76 65 6e 74 29 0d 7b | 0d 09 69 66 28 28 57 69 |event).{|..if((Wi|
|00000b00| 6e 64 6f 77 50 74 72 29 | 20 65 76 65 6e 74 2d 3e |ndowPtr)| event->|
|00000b10| 6d 65 73 73 61 67 65 20 | 3d 3d 20 67 57 69 6e 64 |message |== gWind|
|00000b20| 6f 77 29 0d 09 7b 0d 09 | 09 45 72 61 73 65 52 65 |ow)..{..|.EraseRe|
|00000b30| 63 74 28 26 67 57 69 6e | 64 6f 77 2d 3e 70 6f 72 |ct(&gWin|dow->por|
|00000b40| 74 52 65 63 74 29 3b 0d | 09 7d 0d 7d 0d 0d 2f 2a |tRect);.|.}.}../*|
|00000b50| 20 43 61 6c 6c 65 64 20 | 77 68 65 6e 20 74 68 65 | Called |when the|
|00000b60| 20 73 68 65 6c 6c 20 72 | 65 63 69 65 76 65 73 20 | shell r|ecieves |
|00000b70| 61 20 6e 75 6c 6c 20 65 | 76 65 6e 74 2e 20 2a 2f |a null e|vent. */|
|00000b80| 0d 76 6f 69 64 20 41 70 | 70 49 64 6c 65 28 45 76 |.void Ap|pIdle(Ev|
|00000b90| 65 6e 74 52 65 63 6f 72 | 64 20 2a 45 76 65 6e 74 |entRecor|d *Event|
|00000ba0| 29 0d 7b 0d 7d 0d 0d 2f | 2a 20 43 61 6c 6c 65 64 |).{.}../|* Called|
|00000bb0| 20 77 68 65 6e 20 74 68 | 65 72 65 20 69 73 20 61 | when th|ere is a|
|00000bc0| 20 63 6c 69 63 6b 20 69 | 6e 20 74 68 65 20 63 6f | click i|n the co|
|00000bd0| 6e 74 65 6e 74 20 6f 66 | 20 61 20 77 69 6e 64 6f |ntent of| a windo|
|00000be0| 77 2e 20 54 68 65 20 70 | 6f 72 74 20 69 73 20 61 |w. The p|ort is a|
|00000bf0| 6c 72 65 61 64 79 20 73 | 65 74 20 74 6f 20 0d 74 |lready s|et to .t|
|00000c00| 68 65 20 77 69 6e 64 6f | 77 2c 20 61 6e 64 20 74 |he windo|w, and t|
|00000c10| 68 65 50 74 20 69 73 20 | 69 6e 20 6c 6f 63 61 6c |hePt is |in local|
|00000c20| 20 63 6f 6f 72 64 73 2e | 20 2a 2f 0d 76 6f 69 64 | coords.| */.void|
|00000c30| 20 41 70 70 43 6c 69 63 | 6b 28 50 6f 69 6e 74 20 | AppClic|k(Point |
|00000c40| 74 68 65 50 74 2c 20 57 | 69 6e 64 6f 77 50 74 72 |thePt, W|indowPtr|
|00000c50| 20 77 68 69 63 68 57 69 | 6e 64 70 74 72 2c 20 42 | whichWi|ndptr, B|
|00000c60| 6f 6f 6c 65 61 6e 20 64 | 6f 75 62 6c 65 43 6c 69 |oolean d|oubleCli|
|00000c70| 63 6b 29 0d 7b 0d 7d 0d | 0d 2f 2a 20 43 61 6c 6c |ck).{.}.|./* Call|
|00000c80| 65 64 20 77 68 65 6e 20 | 74 68 65 72 65 20 69 73 |ed when |there is|
|00000c90| 20 61 20 63 6c 69 63 6b | 20 69 6e 20 74 68 65 20 | a click| in the |
|00000ca0| 67 72 6f 77 20 72 65 67 | 69 6f 6e 2e 20 2a 2f 0d |grow reg|ion. */.|
|00000cb0| 76 6f 69 64 20 41 70 70 | 47 72 6f 77 57 69 6e 64 |void App|GrowWind|
|00000cc0| 6f 77 28 57 69 6e 64 6f | 77 50 74 72 20 77 69 6e |ow(Windo|wPtr win|
|00000cd0| 64 2c 20 50 6f 69 6e 74 | 20 77 68 65 72 65 2c 20 |d, Point| where, |
|00000ce0| 52 65 63 74 20 2a 64 65 | 73 6b 29 0d 7b 0d 7d 0d |Rect *de|sk).{.}.|
|00000cf0| 0d 2f 2a 20 43 61 6c 6c | 65 64 20 77 68 65 6e 20 |./* Call|ed when |
|00000d00| 74 68 65 20 75 73 65 72 | 20 63 6c 69 63 6b 73 20 |the user| clicks |
|00000d10| 69 6e 20 74 68 65 20 7a | 6f 6f 6d 20 62 6f 78 20 |in the z|oom box |
|00000d20| 6f 66 20 61 20 77 69 6e | 64 6f 77 2e 20 2a 2f 0d |of a win|dow. */.|
|00000d30| 76 6f 69 64 20 09 41 70 | 70 5a 6f 6f 6d 57 69 6e |void .Ap|pZoomWin|
|00000d40| 64 6f 77 28 57 69 6e 64 | 6f 77 50 74 72 20 77 69 |dow(Wind|owPtr wi|
|00000d50| 6e 64 2c 20 73 68 6f 72 | 74 20 7a 6f 6f 6d 44 69 |nd, shor|t zoomDi|
|00000d60| 72 29 0d 7b 0d 7d 0d 09 | 0d 2f 2a 20 43 61 6c 6c |r).{.}..|./* Call|
|00000d70| 65 64 20 77 68 65 6e 20 | 74 68 65 72 65 20 69 73 |ed when |there is|
|00000d80| 20 61 20 63 6c 69 63 6b | 20 69 6e 20 74 68 65 20 | a click| in the |
|00000d90| 6d 65 6e 75 20 62 61 72 | 2c 20 62 65 66 6f 72 65 |menu bar|, before|
|00000da0| 20 74 68 65 20 6d 65 6e | 75 20 69 73 20 73 68 6f | the men|u is sho|
|00000db0| 77 6e 2e 20 54 68 69 73 | 20 69 73 0d 74 68 65 20 |wn. This| is.the |
|00000dc0| 61 70 70 27 73 20 6f 70 | 70 6f 72 74 75 6e 69 74 |app's op|portunit|
|00000dd0| 79 20 74 6f 20 65 6e 61 | 62 6c 65 20 61 6e 64 20 |y to ena|ble and |
|00000de0| 64 69 73 61 62 6c 65 20 | 6d 65 6e 75 20 69 74 65 |disable |menu ite|
|00000df0| 6d 73 2e 20 2a 2f 0d 76 | 6f 69 64 09 41 70 70 41 |ms. */.v|oid.AppA|
|00000e00| 64 6a 75 73 74 4d 65 6e | 75 73 28 29 0d 7b 0d 7d |djustMen|us().{.}|
|00000e10| 09 0d 0d 2f 2a 20 63 61 | 6c 6c 65 64 20 77 68 65 |.../* ca|lled whe|
|00000e20| 6e 20 61 20 6d 65 6e 75 | 20 6f 74 68 65 72 20 74 |n a menu| other t|
|00000e30| 68 61 6e 20 41 70 70 6c | 65 2c 20 46 69 6c 65 2c |han Appl|e, File,|
|00000e40| 20 6f 72 20 45 64 69 74 | 20 69 73 20 75 73 65 64 | or Edit| is used|
|00000e50| 2e 20 2a 2f 0d 76 6f 69 | 64 20 41 70 70 4d 65 6e |. */.voi|d AppMen|
|00000e60| 75 28 73 68 6f 72 74 20 | 69 64 2c 20 73 68 6f 72 |u(short |id, shor|
|00000e70| 74 20 69 74 65 6d 29 0d | 7b 0d 09 2f 2f 20 50 72 |t item).|{..// Pr|
|00000e80| 6f 74 6f 74 79 70 65 0d | 09 4f 53 45 72 72 20 44 |ototype.|.OSErr D|
|00000e90| 6f 42 61 74 63 68 43 6c | 75 74 53 74 72 69 70 28 |oBatchCl|utStrip(|
|00000ea0| 76 6f 69 64 29 3b 0d 0d | 09 2f 2f 20 42 61 74 63 |void);..|.// Batc|
|00000eb0| 68 20 6d 65 6e 75 0d 09 | 69 66 28 69 64 20 3d 3d |h menu..|if(id ==|
|00000ec0| 20 6b 42 61 74 63 68 4d | 65 6e 75 49 44 29 0d 09 | kBatchM|enuID)..|
|00000ed0| 7b 0d 09 09 4f 53 45 72 | 72 09 65 72 72 3b 0d 09 |{...OSEr|r.err;..|
|00000ee0| 09 0d 09 09 2f 2f 20 4f | 6e 6c 79 20 6f 6e 65 20 |....// O|nly one |
|00000ef0| 69 74 65 6d 20 69 6e 20 | 6d 65 6e 75 0d 09 09 53 |item in |menu...S|
|00000f00| 65 74 50 6f 72 74 28 67 | 57 69 6e 64 6f 77 29 3b |etPort(g|Window);|
|00000f10| 0d 09 09 65 72 72 20 3d | 20 44 6f 42 61 74 63 68 |...err =| DoBatch|
|00000f20| 43 6c 75 74 53 74 72 69 | 70 28 29 3b 0d 09 09 69 |ClutStri|p();...i|
|00000f30| 66 28 65 72 72 20 21 3d | 20 6e 6f 45 72 72 29 0d |f(err !=| noErr).|
|00000f40| 09 09 09 44 65 62 75 67 | 53 74 72 28 22 5c 70 45 |...Debug|Str("\pE|
|00000f50| 72 72 6f 72 20 69 6e 20 | 44 6f 42 61 74 63 68 43 |rror in |DoBatchC|
|00000f60| 6c 75 74 53 74 72 69 70 | 22 29 3b 0d 09 7d 0d 7d |lutStrip|");..}.}|
|00000f70| 0d 0d 2f 2a 20 43 61 6c | 6c 65 64 20 77 68 65 6e |../* Cal|led when|
|00000f80| 20 74 68 65 20 75 73 65 | 72 20 73 65 6c 65 63 74 | the use|r select|
|00000f90| 73 20 22 4e 65 77 22 20 | 66 72 6f 6d 20 74 68 65 |s "New" |from the|
|00000fa0| 20 46 69 6c 65 20 6d 65 | 6e 75 2e 20 2a 2f 09 09 | File me|nu. */..|
|00000fb0| 09 0d 76 6f 69 64 09 41 | 70 70 4e 65 77 28 76 6f |..void.A|ppNew(vo|
|00000fc0| 69 64 29 0d 7b 0d 7d 0d | 0d 2f 2a 20 43 61 6c 6c |id).{.}.|./* Call|
|00000fd0| 65 64 20 77 68 65 6e 20 | 74 68 65 20 75 73 65 72 |ed when |the user|
|00000fe0| 20 73 65 6c 65 63 74 73 | 20 22 4f 70 65 6e 22 20 | selects| "Open" |
|00000ff0| 66 72 6f 6d 20 74 68 65 | 20 46 69 6c 65 20 6d 65 |from the| File me|
|00001000| 6e 75 2e 20 2a 2f 0d 76 | 6f 69 64 09 41 70 70 4f |nu. */.v|oid.AppO|
|00001010| 70 65 6e 28 76 6f 69 64 | 29 0d 7b 0d 7d 0d 0d 0d |pen(void|).{.}...|
|00001020| 2f 2a 20 43 61 6c 6c 65 | 64 20 77 68 65 6e 20 74 |/* Calle|d when t|
|00001030| 68 65 20 75 73 65 72 20 | 73 65 6c 65 63 74 73 20 |he user |selects |
|00001040| 22 43 6c 6f 73 65 22 20 | 66 72 6f 6d 20 74 68 65 |"Close" |from the|
|00001050| 20 46 69 6c 65 20 6d 65 | 6e 75 20 6f 72 20 63 6c | File me|nu or cl|
|00001060| 69 63 6b 73 20 74 68 65 | 20 63 6c 6f 73 65 20 62 |icks the| close b|
|00001070| 6f 78 20 0d 6f 66 20 61 | 20 77 69 6e 64 6f 77 2e |ox .of a| window.|
|00001080| 20 2a 2f 09 09 09 0d 42 | 6f 6f 6c 65 61 6e 09 41 | */....B|oolean.A|
|00001090| 70 70 43 6c 6f 73 65 28 | 76 6f 69 64 29 0d 7b 0d |ppClose(|void).{.|
|000010a0| 09 2f 2a 20 72 65 74 75 | 72 6e 73 20 66 61 6c 73 |./* retu|rns fals|
|000010b0| 65 20 69 66 20 74 68 65 | 20 75 73 65 72 20 63 61 |e if the| user ca|
|000010c0| 6e 63 65 6c 73 20 74 68 | 65 20 73 61 76 65 20 2a |ncels th|e save *|
|000010d0| 2f 0d 09 0d 09 72 65 74 | 75 72 6e 20 74 72 75 65 |/....ret|urn true|
|000010e0| 3b 0d 7d 0d 0d 2f 2a 20 | 43 61 6c 6c 65 64 20 77 |;.}../* |Called w|
|000010f0| 68 65 6e 20 74 68 65 20 | 75 73 65 72 20 73 65 6c |hen the |user sel|
|00001100| 65 63 74 73 20 22 53 61 | 76 65 22 20 66 72 6f 6d |ects "Sa|ve" from|
|00001110| 20 74 68 65 20 46 69 6c | 65 20 6d 65 6e 75 2e 20 | the Fil|e menu. |
|00001120| 2a 2f 0d 42 6f 6f 6c 65 | 61 6e 09 41 70 70 53 61 |*/.Boole|an.AppSa|
|00001130| 76 65 28 76 6f 69 64 29 | 0d 7b 0d 09 2f 2a 20 72 |ve(void)|.{../* r|
|00001140| 65 74 75 72 6e 73 20 66 | 61 6c 73 65 20 69 66 20 |eturns f|alse if |
|00001150| 74 68 65 20 75 73 65 72 | 20 63 61 6e 63 65 6c 73 |the user| cancels|
|00001160| 20 74 68 65 20 73 61 76 | 65 20 2a 2f 0d 09 72 65 | the sav|e */..re|
|00001170| 74 75 72 6e 20 74 72 75 | 65 3b 0d 7d 0d 0d 2f 2a |turn tru|e;.}../*|
|00001180| 20 43 61 6c 6c 65 64 20 | 77 68 65 6e 20 74 68 65 | Called |when the|
|00001190| 20 75 73 65 72 20 73 65 | 6c 65 63 74 73 20 22 53 | user se|lects "S|
|000011a0| 61 76 65 20 41 73 2e 2e | 2e 22 20 66 72 6f 6d 20 |ave As..|." from |
|000011b0| 74 68 65 20 46 69 6c 65 | 20 6d 65 6e 75 2e 20 2a |the File| menu. *|
|000011c0| 2f 0d 42 6f 6f 6c 65 61 | 6e 09 41 70 70 53 61 76 |/.Boolea|n.AppSav|
|000011d0| 65 41 73 28 76 6f 69 64 | 29 0d 7b 0d 09 2f 2a 20 |eAs(void|).{../* |
|000011e0| 72 65 74 75 72 6e 73 20 | 66 61 6c 73 65 20 69 66 |returns |false if|
|000011f0| 20 74 68 65 20 75 73 65 | 72 20 63 61 6e 63 65 6c | the use|r cancel|
|00001200| 73 20 74 68 65 20 73 61 | 76 65 20 2a 2f 0d 09 72 |s the sa|ve */..r|
|00001210| 65 74 75 72 6e 20 74 72 | 75 65 3b 0d 7d 0d 0d 2f |eturn tr|ue;.}../|
|00001220| 2a 20 43 61 6c 6c 65 64 | 20 77 68 65 6e 20 74 68 |* Called| when th|
|00001230| 65 20 75 73 65 72 20 73 | 65 6c 65 63 74 73 20 22 |e user s|elects "|
|00001240| 50 61 67 65 20 53 65 74 | 75 70 2e 2e 2e 22 20 66 |Page Set|up..." f|
|00001250| 72 6f 6d 20 74 68 65 20 | 46 69 6c 65 20 6d 65 6e |rom the |File men|
|00001260| 75 2e 20 2a 2f 0d 76 6f | 69 64 20 41 70 70 50 61 |u. */.vo|id AppPa|
|00001270| 67 65 53 65 74 75 70 28 | 76 6f 69 64 29 0d 7b 0d |geSetup(|void).{.|
|00001280| 7d 0d 0d 2f 2a 20 43 61 | 6c 6c 65 64 20 77 68 65 |}../* Ca|lled whe|
|00001290| 6e 20 74 68 65 20 75 73 | 65 72 20 73 65 6c 65 63 |n the us|er selec|
|000012a0| 74 73 20 22 50 72 69 6e | 74 2e 2e 2e 22 20 66 72 |ts "Prin|t..." fr|
|000012b0| 6f 6d 20 74 68 65 20 46 | 69 6c 65 20 6d 65 6e 75 |om the F|ile menu|
|000012c0| 2e 20 2a 2f 0d 76 6f 69 | 64 20 41 70 70 50 72 69 |. */.voi|d AppPri|
|000012d0| 6e 74 28 76 6f 69 64 29 | 0d 7b 0d 7d 0d 0d 2f 2a |nt(void)|.{.}../*|
|000012e0| 20 43 61 6c 6c 65 64 20 | 77 68 65 6e 20 74 68 65 | Called |when the|
|000012f0| 20 75 73 65 72 20 73 65 | 6c 65 63 74 73 20 22 55 | user se|lects "U|
|00001300| 6e 64 6f 22 20 66 72 6f | 6d 20 74 68 65 20 45 64 |ndo" fro|m the Ed|
|00001310| 69 74 20 6d 65 6e 75 2e | 20 2a 2f 0d 76 6f 69 64 |it menu.| */.void|
|00001320| 20 41 70 70 55 6e 64 6f | 28 76 6f 69 64 29 0d 7b | AppUndo|(void).{|
|00001330| 0d 7d 0d 0d 2f 2a 20 43 | 61 6c 6c 65 64 20 77 68 |.}../* C|alled wh|
|00001340| 65 6e 20 74 68 65 20 75 | 73 65 72 20 73 65 6c 65 |en the u|ser sele|
|00001350| 63 74 73 20 22 43 75 74 | 22 20 66 72 6f 6d 20 74 |cts "Cut|" from t|
|00001360| 68 65 20 45 64 69 74 20 | 6d 65 6e 75 2e 20 2a 2f |he Edit |menu. */|
|00001370| 0d 76 6f 69 64 20 41 70 | 70 43 75 74 28 76 6f 69 |.void Ap|pCut(voi|
|00001380| 64 29 0d 7b 0d 7d 0d 0d | 2f 2a 20 43 61 6c 6c 65 |d).{.}..|/* Calle|
|00001390| 64 20 77 68 65 6e 20 74 | 68 65 20 75 73 65 72 20 |d when t|he user |
|000013a0| 73 65 6c 65 63 74 73 20 | 22 43 6f 70 79 22 20 66 |selects |"Copy" f|
|000013b0| 72 6f 6d 20 74 68 65 20 | 45 64 69 74 20 6d 65 6e |rom the |Edit men|
|000013c0| 75 2e 20 2a 2f 0d 4f 53 | 45 72 72 20 41 70 70 43 |u. */.OS|Err AppC|
|000013d0| 6f 70 79 28 76 6f 69 64 | 29 0d 7b 0d 09 72 65 74 |opy(void|).{..ret|
|000013e0| 75 72 6e 20 6e 6f 45 72 | 72 3b 0d 7d 09 09 09 0d |urn noEr|r;.}....|
|000013f0| 09 09 09 0d 2f 2a 20 43 | 61 6c 6c 65 64 20 77 68 |..../* C|alled wh|
|00001400| 65 6e 20 74 68 65 20 75 | 73 65 72 20 73 65 6c 65 |en the u|ser sele|
|00001410| 63 74 73 20 22 50 61 73 | 74 65 22 20 66 72 6f 6d |cts "Pas|te" from|
|00001420| 20 74 68 65 20 45 64 69 | 74 20 6d 65 6e 75 2e 20 | the Edi|t menu. |
|00001430| 2a 2f 0d 76 6f 69 64 20 | 41 70 70 50 61 73 74 65 |*/.void |AppPaste|
|00001440| 28 76 6f 69 64 29 0d 7b | 0d 7d 0d 0d 2f 2a 20 43 |(void).{|.}../* C|
|00001450| 61 6c 6c 65 64 20 77 68 | 65 6e 20 74 68 65 20 75 |alled wh|en the u|
|00001460| 73 65 72 20 73 65 6c 65 | 63 74 73 20 22 43 6c 65 |ser sele|cts "Cle|
|00001470| 61 72 22 20 66 72 6f 6d | 20 74 68 65 20 45 64 69 |ar" from| the Edi|
|00001480| 74 20 6d 65 6e 75 2e 20 | 2a 2f 0d 76 6f 69 64 20 |t menu. |*/.void |
|00001490| 41 70 70 43 6c 65 61 72 | 28 76 6f 69 64 29 0d 7b |AppClear|(void).{|
|000014a0| 0d 7d 0d 0d 2f 2a 20 09 | 43 61 6c 6c 65 64 20 77 |.}../* .|Called w|
|000014b0| 68 65 6e 20 74 68 65 20 | 75 73 65 72 20 63 68 6f |hen the |user cho|
|000014c0| 6f 73 65 73 20 22 51 75 | 69 74 22 20 66 72 6f 6d |oses "Qu|it" from|
|000014d0| 20 74 68 65 20 46 69 6c | 65 20 6d 65 6e 75 2e 20 | the Fil|e menu. |
|000014e0| 49 66 20 74 68 65 20 75 | 73 65 72 20 63 61 6e 63 |If the u|ser canc|
|000014f0| 65 6c 73 0d 74 68 65 20 | 73 61 76 65 20 69 74 20 |els.the |save it |
|00001500| 72 65 74 75 72 6e 73 20 | 66 61 6c 73 65 2c 20 6f |returns |false, o|
|00001510| 74 68 65 72 77 69 73 65 | 20 69 74 20 72 65 74 75 |therwise| it retu|
|00001520| 72 6e 73 20 74 72 75 65 | 20 61 6e 64 20 74 68 65 |rns true| and the|
|00001530| 20 73 68 65 6c 6c 20 71 | 75 69 74 73 20 2a 2f 0d | shell q|uits */.|
|00001540| 42 6f 6f 6c 65 61 6e 20 | 41 70 70 51 75 69 74 28 |Boolean |AppQuit(|
|00001550| 76 6f 69 64 29 0d 7b 0d | 09 2f 2a 20 72 65 74 75 |void).{.|./* retu|
|00001560| 72 6e 73 20 66 61 6c 73 | 65 20 69 66 20 74 68 65 |rns fals|e if the|
|00001570| 20 75 73 65 72 20 63 61 | 6e 63 65 6c 73 20 74 68 | user ca|ncels th|
|00001580| 65 20 73 61 76 65 20 61 | 74 20 61 6e 79 20 70 6f |e save a|t any po|
|00001590| 69 6e 74 20 2a 2f 0d 09 | 72 65 74 75 72 6e 20 74 |int */..|return t|
|000015a0| 72 75 65 3b 0d 7d 0d 0d | 2f 2a 20 43 61 6c 6c 65 |rue;.}..|/* Calle|
|000015b0| 64 20 77 68 65 6e 20 74 | 68 65 20 73 68 65 6c 6c |d when t|he shell|
|000015c0| 20 69 73 20 61 62 6f 75 | 74 20 74 6f 20 71 75 69 | is abou|t to qui|
|000015d0| 74 2c 20 6a 75 73 74 20 | 64 65 61 6c 6c 6f 63 61 |t, just |dealloca|
|000015e0| 74 65 73 20 6d 65 6d 6f | 72 79 2e 20 2a 2f 0d 76 |tes memo|ry. */.v|
|000015f0| 6f 69 64 20 41 70 70 43 | 6c 65 61 6e 55 70 28 76 |oid AppC|leanUp(v|
|00001600| 6f 69 64 29 0d 7b 0d 09 | 69 66 28 67 57 69 6e 64 |oid).{..|if(gWind|
|00001610| 6f 77 20 21 3d 20 6e 69 | 6c 29 0d 09 7b 0d 09 09 |ow != ni|l)..{...|
|00001620| 43 6c 6f 73 65 57 69 6e | 64 6f 77 28 67 57 69 6e |CloseWin|dow(gWin|
|00001630| 64 6f 77 29 3b 0d 09 09 | 67 57 69 6e 64 6f 77 20 |dow);...|gWindow |
|00001640| 3d 20 6e 69 6c 3b 0d 09 | 7d 0d 7d 0d 0d 2f 2a 20 |= nil;..|}.}../* |
|00001650| 41 70 70 6c 65 20 45 76 | 65 6e 74 20 68 61 6e 64 |Apple Ev|ent hand|
|00001660| 6c 65 72 73 20 2a 2f 0d | 70 61 73 63 61 6c 20 4f |lers */.|pascal O|
|00001670| 53 45 72 72 20 41 70 70 | 4f 41 50 50 48 61 6e 64 |SErr App|OAPPHand|
|00001680| 6c 65 72 28 41 70 70 6c | 65 45 76 65 6e 74 20 2a |ler(Appl|eEvent *|
|00001690| 74 68 65 41 45 76 65 6e | 74 2c 20 41 70 70 6c 65 |theAEven|t, Apple|
|000016a0| 45 76 65 6e 74 20 2a 72 | 65 70 6c 79 2c 20 6c 6f |Event *r|eply, lo|
|000016b0| 6e 67 20 72 65 66 63 6f | 6e 29 0d 7b 0d 09 4f 53 |ng refco|n).{..OS|
|000016c0| 45 72 72 09 65 72 72 3b | 0d 0d 09 65 72 72 20 3d |Err.err;|...err =|
|000016d0| 20 4d 79 47 6f 74 52 65 | 71 75 69 72 65 64 50 61 | MyGotRe|quiredPa|
|000016e0| 72 61 6d 73 28 74 68 65 | 41 45 76 65 6e 74 29 3b |rams(the|AEvent);|
|000016f0| 0d 09 69 66 20 28 65 72 | 72 29 0d 09 09 72 65 74 |..if (er|r)...ret|
|00001700| 75 72 6e 20 65 72 72 3b | 0d 09 65 6c 73 65 20 7b |urn err;|..else {|
|00001710| 0d 09 09 2f 2f 20 4a 75 | 73 74 20 64 6f 20 61 6e |...// Ju|st do an|
|00001720| 20 41 70 70 4e 65 77 28 | 29 0d 09 09 41 70 70 4e | AppNew(|)...AppN|
|00001730| 65 77 28 29 3b 0d 09 09 | 72 65 74 75 72 6e 20 6e |ew();...|return n|
|00001740| 6f 45 72 72 3b 0d 09 7d | 0d 7d 0d 0d 70 61 73 63 |oErr;..}|.}..pasc|
|00001750| 61 6c 20 4f 53 45 72 72 | 20 41 70 70 4f 44 4f 43 |al OSErr| AppODOC|
|00001760| 48 61 6e 64 6c 65 72 28 | 41 70 70 6c 65 45 76 65 |Handler(|AppleEve|
|00001770| 6e 74 20 2a 74 68 65 41 | 45 76 65 6e 74 2c 20 41 |nt *theA|Event, A|
|00001780| 70 70 6c 65 45 76 65 6e | 74 20 2a 72 65 70 6c 79 |ppleEven|t *reply|
|00001790| 2c 20 6c 6f 6e 67 20 72 | 65 66 63 6f 6e 29 0d 7b |, long r|efcon).{|
|000017a0| 0d 09 46 53 53 70 65 63 | 09 09 6d 79 46 53 53 3b |..FSSpec|..myFSS;|
|000017b0| 0d 09 41 45 44 65 73 63 | 4c 69 73 74 09 64 6f 63 |..AEDesc|List.doc|
|000017c0| 4c 69 73 74 3b 0d 09 4f | 53 45 72 72 09 09 65 72 |List;..O|SErr..er|
|000017d0| 72 3b 0d 09 6c 6f 6e 67 | 09 09 69 6e 64 65 78 2c |r;..long|..index,|
|000017e0| 20 69 74 65 6d 73 49 6e | 4c 69 73 74 3b 0d 09 53 | itemsIn|List;..S|
|000017f0| 69 7a 65 09 09 61 63 74 | 75 61 6c 53 69 7a 65 3b |ize..act|ualSize;|
|00001800| 0d 09 41 45 4b 65 79 77 | 6f 72 64 09 6b 65 79 77 |..AEKeyw|ord.keyw|
|00001810| 64 3b 0d 09 44 65 73 63 | 54 79 70 65 09 72 65 74 |d;..Desc|Type.ret|
|00001820| 75 72 6e 65 64 54 79 70 | 65 3b 0d 0d 09 2f 2f 20 |urnedTyp|e;...// |
|00001830| 67 65 74 20 74 68 65 20 | 64 69 72 65 63 74 20 70 |get the |direct p|
|00001840| 61 72 61 6d 65 74 65 72 | 2d 2d 61 20 64 65 73 63 |arameter|--a desc|
|00001850| 72 69 70 74 6f 72 20 6c | 69 73 74 2d 2d 61 6e 64 |riptor l|ist--and|
|00001860| 20 70 75 74 0d 09 2f 2f | 20 69 74 20 69 6e 74 6f | put..//| it into|
|00001870| 20 64 6f 63 4c 69 73 74 | 0d 09 65 72 72 20 3d 20 | docList|..err = |
|00001880| 41 45 47 65 74 50 61 72 | 61 6d 44 65 73 63 28 74 |AEGetPar|amDesc(t|
|00001890| 68 65 41 45 76 65 6e 74 | 2c 20 6b 65 79 44 69 72 |heAEvent|, keyDir|
|000018a0| 65 63 74 4f 62 6a 65 63 | 74 2c 0d 09 09 09 09 09 |ectObjec|t,......|
|000018b0| 09 09 74 79 70 65 41 45 | 4c 69 73 74 2c 20 26 64 |..typeAE|List, &d|
|000018c0| 6f 63 4c 69 73 74 29 3b | 0d 09 69 66 20 28 65 72 |ocList);|..if (er|
|000018d0| 72 29 0d 09 09 72 65 74 | 75 72 6e 20 65 72 72 3b |r)...ret|urn err;|
|000018e0| 0d 0d 09 2f 2f 20 63 68 | 65 63 6b 20 66 6f 72 20 |...// ch|eck for |
|000018f0| 6d 69 73 73 69 6e 67 20 | 72 65 71 75 69 72 65 64 |missing |required|
|00001900| 20 70 61 72 61 6d 65 74 | 65 72 73 0d 09 65 72 72 | paramet|ers..err|
|00001910| 20 3d 20 4d 79 47 6f 74 | 52 65 71 75 69 72 65 64 | = MyGot|Required|
|00001920| 50 61 72 61 6d 73 28 74 | 68 65 41 45 76 65 6e 74 |Params(t|heAEvent|
|00001930| 29 3b 0d 09 69 66 20 28 | 65 72 72 29 20 7b 0d 09 |);..if (|err) {..|
|00001940| 09 2f 2f 20 61 6e 20 65 | 72 72 6f 72 20 6f 63 63 |.// an e|rror occ|
|00001950| 75 72 72 65 64 3a 20 20 | 64 6f 20 74 68 65 20 6e |urred: |do the n|
|00001960| 65 63 65 73 73 61 72 79 | 20 65 72 72 6f 72 20 68 |ecessary| error h|
|00001970| 61 6e 64 6c 69 6e 67 0d | 09 09 65 72 72 20 3d 20 |andling.|..err = |
|00001980| 41 45 44 69 73 70 6f 73 | 65 44 65 73 63 28 26 64 |AEDispos|eDesc(&d|
|00001990| 6f 63 4c 69 73 74 29 3b | 0d 09 09 72 65 74 75 72 |ocList);|...retur|
|000019a0| 6e 09 65 72 72 3b 0d 09 | 7d 0d 0d 09 2f 2f 20 63 |n.err;..|}...// c|
|000019b0| 6f 75 6e 74 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |ount the| number |
|000019c0| 6f 66 20 64 65 73 63 72 | 69 70 74 6f 72 20 72 65 |of descr|iptor re|
|000019d0| 63 6f 72 64 73 20 69 6e | 20 74 68 65 20 6c 69 73 |cords in| the lis|
|000019e0| 74 0d 09 65 72 72 20 3d | 20 41 45 43 6f 75 6e 74 |t..err =| AECount|
|000019f0| 49 74 65 6d 73 20 28 26 | 64 6f 63 4c 69 73 74 2c |Items (&|docList,|
|00001a00| 20 26 69 74 65 6d 73 49 | 6e 4c 69 73 74 29 3b 0d | &itemsI|nList);.|
|00001a10| 0d 09 2f 2f 20 6e 6f 77 | 20 67 65 74 20 65 61 63 |..// now| get eac|
|00001a20| 68 20 64 65 73 63 72 69 | 70 74 6f 72 20 72 65 63 |h descri|ptor rec|
|00001a30| 6f 72 64 20 66 72 6f 6d | 20 74 68 65 20 6c 69 73 |ord from| the lis|
|00001a40| 74 2c 20 63 6f 65 72 63 | 65 0d 09 2f 2f 20 74 68 |t, coerc|e..// th|
|00001a50| 65 20 72 65 74 75 72 6e | 65 64 20 64 61 74 61 20 |e return|ed data |
|00001a60| 74 6f 20 61 6e 20 46 53 | 53 70 65 63 20 72 65 63 |to an FS|Spec rec|
|00001a70| 6f 72 64 2c 20 61 6e 64 | 20 6f 70 65 6e 20 74 68 |ord, and| open th|
|00001a80| 65 0d 09 2f 2f 20 61 73 | 73 6f 63 69 61 74 65 64 |e..// as|sociated|
|00001a90| 20 66 69 6c 65 0d 09 66 | 6f 72 20 28 69 6e 64 65 | file..f|or (inde|
|00001aa0| 78 20 3d 20 31 3b 20 69 | 6e 64 65 78 20 3c 3d 20 |x = 1; i|ndex <= |
|00001ab0| 69 74 65 6d 73 49 6e 4c | 69 73 74 3b 20 69 6e 64 |itemsInL|ist; ind|
|00001ac0| 65 78 2b 2b 29 0d 09 7b | 0d 09 09 65 72 72 20 3d |ex++)..{|...err =|
|00001ad0| 20 41 45 47 65 74 4e 74 | 68 50 74 72 28 26 64 6f | AEGetNt|hPtr(&do|
|00001ae0| 63 4c 69 73 74 2c 20 69 | 6e 64 65 78 2c 20 74 79 |cList, i|ndex, ty|
|00001af0| 70 65 46 53 53 2c 20 26 | 6b 65 79 77 64 2c 0d 09 |peFSS, &|keywd,..|
|00001b00| 09 09 09 09 09 09 26 72 | 65 74 75 72 6e 65 64 54 |......&r|eturnedT|
|00001b10| 79 70 65 2c 20 28 50 74 | 72 29 26 6d 79 46 53 53 |ype, (Pt|r)&myFSS|
|00001b20| 2c 0d 09 09 09 09 09 09 | 09 73 69 7a 65 6f 66 28 |,.......|.sizeof(|
|00001b30| 6d 79 46 53 53 29 2c 20 | 26 61 63 74 75 61 6c 53 |myFSS), |&actualS|
|00001b40| 69 7a 65 29 3b 0d 09 09 | 69 66 20 28 65 72 72 29 |ize);...|if (err)|
|00001b50| 0d 09 09 09 53 79 73 42 | 65 65 70 28 31 30 29 3b |....SysB|eep(10);|
|00001b60| 0d 09 09 0d 09 09 2f 2f | 20 4f 70 65 6e 20 74 68 |......//| Open th|
|00001b70| 65 20 66 69 6c 65 0d 09 | 09 53 79 73 42 65 65 70 |e file..|.SysBeep|
|00001b80| 28 31 30 29 3b 20 2f 2f | 20 53 6f 72 72 79 2c 20 |(10); //| Sorry, |
|00001b90| 6e 6f 20 66 69 6c 65 73 | 20 74 6f 20 6f 70 65 6e |no files| to open|
|00001ba0| 20 79 65 74 0d 09 09 0d | 09 09 69 66 20 28 65 72 | yet....|..if (er|
|00001bb0| 72 29 0d 09 09 09 53 79 | 73 42 65 65 70 28 31 30 |r)....Sy|sBeep(10|
|00001bc0| 29 3b 0d 09 7d 0d 0d 09 | 65 72 72 20 3d 20 41 45 |);..}...|err = AE|
|00001bd0| 44 69 73 70 6f 73 65 44 | 65 73 63 28 26 64 6f 63 |DisposeD|esc(&doc|
|00001be0| 4c 69 73 74 29 3b 0d 09 | 72 65 74 75 72 6e 09 6e |List);..|return.n|
|00001bf0| 6f 45 72 72 3b 0d 7d 0d | 0d 70 61 73 63 61 6c 20 |oErr;.}.|.pascal |
|00001c00| 4f 53 45 72 72 20 41 70 | 70 50 44 4f 43 48 61 6e |OSErr Ap|pPDOCHan|
|00001c10| 64 6c 65 72 28 41 70 70 | 6c 65 45 76 65 6e 74 20 |dler(App|leEvent |
|00001c20| 2a 74 68 65 41 45 76 65 | 6e 74 2c 20 41 70 70 6c |*theAEve|nt, Appl|
|00001c30| 65 45 76 65 6e 74 20 2a | 72 65 70 6c 79 2c 20 6c |eEvent *|reply, l|
|00001c40| 6f 6e 67 20 72 65 66 63 | 6f 6e 29 0d 7b 0d 09 46 |ong refc|on).{..F|
|00001c50| 53 53 70 65 63 09 09 6d | 79 46 53 53 3b 0d 09 41 |SSpec..m|yFSS;..A|
|00001c60| 45 44 65 73 63 4c 69 73 | 74 09 64 6f 63 4c 69 73 |EDescLis|t.docLis|
|00001c70| 74 3b 0d 09 4f 53 45 72 | 72 09 09 65 72 72 3b 0d |t;..OSEr|r..err;.|
|00001c80| 09 6c 6f 6e 67 09 09 69 | 6e 64 65 78 2c 20 69 74 |.long..i|ndex, it|
|00001c90| 65 6d 73 49 6e 4c 69 73 | 74 3b 0d 09 53 69 7a 65 |emsInLis|t;..Size|
|00001ca0| 09 09 61 63 74 75 61 6c | 53 69 7a 65 3b 0d 09 41 |..actual|Size;..A|
|00001cb0| 45 4b 65 79 77 6f 72 64 | 09 6b 65 79 77 64 3b 0d |EKeyword|.keywd;.|
|00001cc0| 09 44 65 73 63 54 79 70 | 65 09 72 65 74 75 72 6e |.DescTyp|e.return|
|00001cd0| 65 64 54 79 70 65 3b 0d | 0d 09 2f 2f 20 67 65 74 |edType;.|..// get|
|00001ce0| 20 74 68 65 20 64 69 72 | 65 63 74 20 70 61 72 61 | the dir|ect para|
|00001cf0| 6d 65 74 65 72 2d 2d 61 | 20 64 65 73 63 72 69 70 |meter--a| descrip|
|00001d00| 74 6f 72 20 6c 69 73 74 | 2d 2d 61 6e 64 20 70 75 |tor list|--and pu|
|00001d10| 74 0d 09 2f 2f 20 69 74 | 20 69 6e 74 6f 20 64 6f |t..// it| into do|
|00001d20| 63 4c 69 73 74 0d 09 65 | 72 72 20 3d 20 41 45 47 |cList..e|rr = AEG|
|00001d30| 65 74 50 61 72 61 6d 44 | 65 73 63 28 74 68 65 41 |etParamD|esc(theA|
|00001d40| 45 76 65 6e 74 2c 20 6b | 65 79 44 69 72 65 63 74 |Event, k|eyDirect|
|00001d50| 4f 62 6a 65 63 74 2c 0d | 09 09 09 09 09 09 09 74 |Object,.|.......t|
|00001d60| 79 70 65 41 45 4c 69 73 | 74 2c 20 26 64 6f 63 4c |ypeAELis|t, &docL|
|00001d70| 69 73 74 29 3b 0d 09 69 | 66 20 28 65 72 72 29 0d |ist);..i|f (err).|
|00001d80| 09 09 72 65 74 75 72 6e | 20 65 72 72 3b 0d 0d 09 |..return| err;...|
|00001d90| 2f 2f 20 63 68 65 63 6b | 20 66 6f 72 20 6d 69 73 |// check| for mis|
|00001da0| 73 69 6e 67 20 72 65 71 | 75 69 72 65 64 20 70 61 |sing req|uired pa|
|00001db0| 72 61 6d 65 74 65 72 73 | 0d 09 65 72 72 20 3d 20 |rameters|..err = |
|00001dc0| 4d 79 47 6f 74 52 65 71 | 75 69 72 65 64 50 61 72 |MyGotReq|uiredPar|
|00001dd0| 61 6d 73 28 74 68 65 41 | 45 76 65 6e 74 29 3b 0d |ams(theA|Event);.|
|00001de0| 09 69 66 20 28 65 72 72 | 29 20 7b 0d 09 09 2f 2f |.if (err|) {...//|
|00001df0| 20 61 6e 20 65 72 72 6f | 72 20 6f 63 63 75 72 72 | an erro|r occurr|
|00001e00| 65 64 3a 20 20 64 6f 20 | 74 68 65 20 6e 65 63 65 |ed: do |the nece|
|00001e10| 73 73 61 72 79 20 65 72 | 72 6f 72 20 68 61 6e 64 |ssary er|ror hand|
|00001e20| 6c 69 6e 67 0d 09 09 65 | 72 72 20 3d 20 41 45 44 |ling...e|rr = AED|
|00001e30| 69 73 70 6f 73 65 44 65 | 73 63 28 26 64 6f 63 4c |isposeDe|sc(&docL|
|00001e40| 69 73 74 29 3b 0d 09 09 | 72 65 74 75 72 6e 09 65 |ist);...|return.e|
|00001e50| 72 72 3b 0d 09 7d 0d 0d | 09 2f 2f 20 63 6f 75 6e |rr;..}..|.// coun|
|00001e60| 74 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |t the nu|mber of |
|00001e70| 64 65 73 63 72 69 70 74 | 6f 72 20 72 65 63 6f 72 |descript|or recor|
|00001e80| 64 73 20 69 6e 20 74 68 | 65 20 6c 69 73 74 0d 09 |ds in th|e list..|
|00001e90| 65 72 72 20 3d 20 41 45 | 43 6f 75 6e 74 49 74 65 |err = AE|CountIte|
|00001ea0| 6d 73 20 28 26 64 6f 63 | 4c 69 73 74 2c 20 26 69 |ms (&doc|List, &i|
|00001eb0| 74 65 6d 73 49 6e 4c 69 | 73 74 29 3b 0d 0d 09 2f |temsInLi|st);.../|
|00001ec0| 2f 20 6e 6f 77 20 67 65 | 74 20 65 61 63 68 20 64 |/ now ge|t each d|
|00001ed0| 65 73 63 72 69 70 74 6f | 72 20 72 65 63 6f 72 64 |escripto|r record|
|00001ee0| 20 66 72 6f 6d 20 74 68 | 65 20 6c 69 73 74 2c 20 | from th|e list, |
|00001ef0| 63 6f 65 72 63 65 0d 09 | 2f 2f 20 74 68 65 20 72 |coerce..|// the r|
|00001f00| 65 74 75 72 6e 65 64 20 | 64 61 74 61 20 74 6f 20 |eturned |data to |
|00001f10| 61 6e 20 46 53 53 70 65 | 63 20 72 65 63 6f 72 64 |an FSSpe|c record|
|00001f20| 2c 20 61 6e 64 20 6f 70 | 65 6e 20 74 68 65 0d 09 |, and op|en the..|
|00001f30| 2f 2f 20 61 73 73 6f 63 | 69 61 74 65 64 20 66 69 |// assoc|iated fi|
|00001f40| 6c 65 0d 09 66 6f 72 20 | 28 69 6e 64 65 78 20 3d |le..for |(index =|
|00001f50| 20 31 3b 20 69 6e 64 65 | 78 20 3c 3d 20 69 74 65 | 1; inde|x <= ite|
|00001f60| 6d 73 49 6e 4c 69 73 74 | 3b 20 69 6e 64 65 78 2b |msInList|; index+|
|00001f70| 2b 29 0d 09 7b 0d 09 09 | 65 72 72 20 3d 20 41 45 |+)..{...|err = AE|
|00001f80| 47 65 74 4e 74 68 50 74 | 72 28 26 64 6f 63 4c 69 |GetNthPt|r(&docLi|
|00001f90| 73 74 2c 20 69 6e 64 65 | 78 2c 20 74 79 70 65 46 |st, inde|x, typeF|
|00001fa0| 53 53 2c 20 26 6b 65 79 | 77 64 2c 0d 09 09 09 09 |SS, &key|wd,.....|
|00001fb0| 09 09 09 26 72 65 74 75 | 72 6e 65 64 54 79 70 65 |...&retu|rnedType|
|00001fc0| 2c 20 28 50 74 72 29 26 | 6d 79 46 53 53 2c 0d 09 |, (Ptr)&|myFSS,..|
|00001fd0| 09 09 09 09 09 09 73 69 | 7a 65 6f 66 28 6d 79 46 |......si|zeof(myF|
|00001fe0| 53 53 29 2c 20 26 61 63 | 74 75 61 6c 53 69 7a 65 |SS), &ac|tualSize|
|00001ff0| 29 3b 0d 09 09 69 66 20 | 28 65 72 72 29 0d 09 09 |);...if |(err)...|
|00002000| 09 53 79 73 42 65 65 70 | 28 31 30 29 3b 0d 09 09 |.SysBeep|(10);...|
|00002010| 0d 09 09 2f 2f 20 50 72 | 69 6e 74 20 74 68 65 20 |...// Pr|int the |
|00002020| 66 69 6c 65 0d 09 09 53 | 79 73 42 65 65 70 28 31 |file...S|ysBeep(1|
|00002030| 30 29 3b 0d 09 09 0d 09 | 09 69 66 20 28 65 72 72 |0);.....|.if (err|
|00002040| 29 0d 09 09 09 53 79 73 | 42 65 65 70 28 31 30 29 |)....Sys|Beep(10)|
|00002050| 3b 0d 09 7d 0d 0d 09 65 | 72 72 20 3d 20 41 45 44 |;..}...e|rr = AED|
|00002060| 69 73 70 6f 73 65 44 65 | 73 63 28 26 64 6f 63 4c |isposeDe|sc(&docL|
|00002070| 69 73 74 29 3b 0d 09 72 | 65 74 75 72 6e 09 6e 6f |ist);..r|eturn.no|
|00002080| 45 72 72 3b 0d 7d 0d 0d | 70 61 73 63 61 6c 20 4f |Err;.}..|pascal O|
|00002090| 53 45 72 72 20 41 70 70 | 51 55 49 54 48 61 6e 64 |SErr App|QUITHand|
|000020a0| 6c 65 72 28 41 70 70 6c | 65 45 76 65 6e 74 20 2a |ler(Appl|eEvent *|
|000020b0| 74 68 65 41 45 76 65 6e | 74 2c 20 41 70 70 6c 65 |theAEven|t, Apple|
|000020c0| 45 76 65 6e 74 20 2a 72 | 65 70 6c 79 2c 20 6c 6f |Event *r|eply, lo|
|000020d0| 6e 67 20 72 65 66 63 6f | 6e 29 0d 7b 0d 09 4f 53 |ng refco|n).{..OS|
|000020e0| 45 72 72 09 65 72 72 3b | 0d 0d 09 2f 2f 20 63 68 |Err.err;|...// ch|
|000020f0| 65 63 6b 20 66 6f 72 20 | 6d 69 73 73 69 6e 67 20 |eck for |missing |
|00002100| 72 65 71 75 69 72 65 64 | 20 70 61 72 61 6d 65 74 |required| paramet|
|00002110| 65 72 73 0d 09 65 72 72 | 20 3d 20 4d 79 47 6f 74 |ers..err| = MyGot|
|00002120| 52 65 71 75 69 72 65 64 | 50 61 72 61 6d 73 28 74 |Required|Params(t|
|00002130| 68 65 41 45 76 65 6e 74 | 29 3b 0d 09 69 66 20 28 |heAEvent|);..if (|
|00002140| 65 72 72 29 20 7b 0d 09 | 09 2f 2f 20 61 6e 20 65 |err) {..|.// an e|
|00002150| 72 72 6f 72 20 6f 63 63 | 75 72 72 65 64 3a 20 20 |rror occ|urred: |
|00002160| 64 6f 20 74 68 65 20 6e | 65 63 65 73 73 61 72 79 |do the n|ecessary|
|00002170| 20 65 72 72 6f 72 20 68 | 61 6e 64 6c 69 6e 67 0d | error h|andling.|
|00002180| 09 09 72 65 74 75 72 6e | 09 65 72 72 3b 0d 09 7d |..return|.err;..}|
|00002190| 0d 09 0d 09 2f 2f 20 53 | 65 74 20 74 68 65 20 67 |....// S|et the g|
|000021a0| 6c 6f 62 61 6c 20 66 6c | 61 67 20 69 66 20 74 68 |lobal fl|ag if th|
|000021b0| 65 20 75 73 65 72 20 64 | 6f 65 73 6e 27 74 20 63 |e user d|oesn't c|
|000021c0| 61 6e 63 65 6c 0d 09 67 | 44 6f 6e 65 46 6c 61 67 |ancel..g|DoneFlag|
|000021d0| 20 3d 20 41 70 70 51 75 | 69 74 28 29 3b 0d 09 69 | = AppQu|it();..i|
|000021e0| 66 28 67 44 6f 6e 65 46 | 6c 61 67 20 3d 3d 20 66 |f(gDoneF|lag == f|
|000021f0| 61 6c 73 65 29 0d 09 09 | 72 65 74 75 72 6e 09 75 |alse)...|return.u|
|00002200| 73 65 72 43 61 6e 63 65 | 6c 65 64 45 72 72 3b 0d |serCance|ledErr;.|
|00002210| 09 65 6c 73 65 0d 09 09 | 72 65 74 75 72 6e 09 6e |.else...|return.n|
|00002220| 6f 45 72 72 3b 0d 7d 0d | 0d 4f 53 45 72 72 09 4d |oErr;.}.|.OSErr.M|
|00002230| 79 47 6f 74 52 65 71 75 | 69 72 65 64 50 61 72 61 |yGotRequ|iredPara|
|00002240| 6d 73 20 28 41 70 70 6c | 65 45 76 65 6e 74 20 2a |ms (Appl|eEvent *|
|00002250| 74 68 65 41 45 76 65 6e | 74 29 0d 7b 0d 09 44 65 |theAEven|t).{..De|
|00002260| 73 63 54 79 70 65 09 72 | 65 74 75 72 6e 65 64 54 |scType.r|eturnedT|
|00002270| 79 70 65 3b 0d 09 53 69 | 7a 65 09 09 61 63 74 75 |ype;..Si|ze..actu|
|00002280| 61 6c 53 69 7a 65 3b 0d | 09 4f 53 45 72 72 09 09 |alSize;.|.OSErr..|
|00002290| 65 72 72 3b 0d 0d 09 65 | 72 72 20 3d 20 41 45 47 |err;...e|rr = AEG|
|000022a0| 65 74 41 74 74 72 69 62 | 75 74 65 50 74 72 28 74 |etAttrib|utePtr(t|
|000022b0| 68 65 41 45 76 65 6e 74 | 2c 20 6b 65 79 4d 69 73 |heAEvent|, keyMis|
|000022c0| 73 65 64 4b 65 79 77 6f | 72 64 41 74 74 72 2c 0d |sedKeywo|rdAttr,.|
|000022d0| 09 09 09 09 09 74 79 70 | 65 57 69 6c 64 43 61 72 |.....typ|eWildCar|
|000022e0| 64 2c 20 26 72 65 74 75 | 72 6e 65 64 54 79 70 65 |d, &retu|rnedType|
|000022f0| 2c 0d 09 09 09 09 09 6e | 69 6c 2c 20 30 2c 20 26 |,......n|il, 0, &|
|00002300| 61 63 74 75 61 6c 53 69 | 7a 65 29 3b 0d 0d 09 69 |actualSi|ze);...i|
|00002310| 66 20 28 65 72 72 20 3d | 3d 20 65 72 72 41 45 44 |f (err =|= errAED|
|00002320| 65 73 63 4e 6f 74 46 6f | 75 6e 64 29 09 2f 2f 20 |escNotFo|und).// |
|00002330| 79 6f 75 20 67 6f 74 20 | 27 65 6d 20 61 6c 6c 0d |you got |'em all.|
|00002340| 09 09 72 65 74 75 72 6e | 09 6e 6f 45 72 72 3b 0d |..return|.noErr;.|
|00002350| 09 65 6c 73 65 0d 09 09 | 69 66 20 28 65 72 72 20 |.else...|if (err |
|00002360| 3d 3d 20 6e 6f 45 72 72 | 29 20 20 2f 2f 20 79 6f |== noErr|) // yo|
|00002370| 75 20 6d 69 73 73 65 64 | 20 61 20 72 65 71 75 69 |u missed| a requi|
|00002380| 72 65 64 20 70 61 72 61 | 6d 65 74 65 72 0d 09 09 |red para|meter...|
|00002390| 09 72 65 74 75 72 6e 09 | 65 72 72 41 45 50 61 72 |.return.|errAEPar|
|000023a0| 61 6d 4d 69 73 73 65 64 | 3b 0d 09 09 65 6c 73 65 |amMissed|;...else|
|000023b0| 09 2f 2f 20 74 68 65 20 | 63 61 6c 6c 20 74 6f 20 |.// the |call to |
|000023c0| 41 45 47 65 74 41 74 74 | 72 69 62 75 74 65 50 74 |AEGetAtt|ributePt|
|000023d0| 72 20 66 61 69 6c 65 64 | 0d 09 09 09 72 65 74 75 |r failed|....retu|
|000023e0| 72 6e 09 65 72 72 3b 0d | 7d 0d 0d 00 00 00 00 00 |rn.err;.|}.......|
|000023f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002400| 00 00 01 00 00 00 03 ba | 00 00 02 ba 00 00 00 66 |........|.......f|
|00002410| 2f 0d 09 09 67 42 72 75 | 73 68 53 74 75 66 66 2e |/...gBru|shStuff.|
|00002420| 73 74 6f 72 61 67 65 20 | 3d 20 28 6c 6f 6e 67 29 |storage |= (long)|
|00002430| 05 41 70 70 2e 63 02 00 | 00 00 54 45 58 54 4d 4d |.App.c..|..TEXTMM|
|00002440| 43 43 01 00 00 00 00 80 | 00 00 00 00 1a 3c 00 00 |CC......|.....<..|
|00002450| 00 00 54 45 58 54 4d 4d | 43 43 01 00 00 00 00 80 |..TEXTMM|CC......|
|00002460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002470| 00 00 a5 9c 43 50 00 00 | 23 6b 00 00 04 20 69 64 |....CP..|#k... id|
|00002480| 29 3b 0d 0d 2f 2a 20 45 | 76 65 6e 74 73 20 2a 2f |);../* E|vents */|
|00002490| 0d 76 6f 69 64 20 09 44 | 6f 41 70 70 55 70 64 61 |.void .D|oAppUpda|
|000024a0| 74 65 28 45 76 65 6e 74 | 52 65 63 6f 72 64 20 2a |te(Event|Record *|
|000024b0| 45 76 65 6e 74 29 3b 0d | 76 6f 69 64 20 09 44 6f |Event);.|void .Do|
|000024c0| 41 70 70 49 64 6c 65 28 | 45 76 65 6e 74 52 65 63 |AppIdle(|EventRec|
|000024d0| 6f 72 64 20 2a 45 76 65 | 6e 74 29 3b 0d 76 6f 69 |ord *Eve|nt);.voi|
|000024e0| 64 20 09 44 6f 41 70 70 | 43 6c 69 63 6b 28 50 6f |d .DoApp|Click(Po|
|000024f0| 69 6e 74 20 74 68 65 50 | 74 2c 20 57 69 6e 64 6f |int theP|t, Windo|
|00002500| 00 00 00 0a 00 00 03 45 | ff ff 00 00 00 00 00 00 |.......E|........|
|00002510| 00 32 00 02 00 14 00 00 | 03 6c 00 2a 01 0a 6f 70 |.2......|.l.*..op|
|00002520| 00 00 05 72 73 6c 74 20 | 00 1c 00 00 03 6c 00 2a |...rslt |.....l.*|
|00002530| 01 0a 6f 60 10 04 0d 67 | 65 73 74 61 6c 74 52 65 |..o`...g|estaltRe|
|00002540| 73 75 6c 74 00 00 02 26 | 00 18 00 00 02 c3 00 00 |sult...&|........|
|00002550| 02 ca 0d 00 00 00 31 20 | 41 70 70 49 6e 69 74 00 |......1 |AppInit.|
|00002560| 00 00 05 ca 00 00 05 d5 | 11 00 00 00 32 20 41 70 |........|....2 Ap|
|00002570| 70 41 63 74 69 76 61 74 | 65 00 00 00 06 83 00 00 |pActivat|e.......|
|00002580| 06 8c 0f 00 00 00 33 20 | 41 70 70 55 70 64 61 74 |......3 |AppUpdat|
|00002590| 65 00 00 00 07 ad 00 00 | 07 b4 0d 00 00 00 34 20 |e.......|......4 |
|000025a0| 41 70 70 49 64 6c 65 00 | 00 00 08 58 00 00 08 60 |AppIdle.|...X...`|
|000025b0| 0d 00 00 00 35 20 41 70 | 70 43 6c 69 63 6b 00 00 |....5 Ap|pClick..|
|000025c0| 08 dc 00 00 08 e9 13 00 | 00 00 36 20 41 70 70 47 |........|..6 AppG|
|000025d0| 72 6f 77 57 69 6e 64 6f | 77 00 00 00 09 5d 00 00 |rowWindo|w....]..|
|000025e0| 09 6a 13 00 00 00 37 20 | 41 70 70 5a 6f 6f 6d 57 |.j....7 |AppZoomW|
|000025f0| 69 6e 64 6f 77 00 00 00 | 0a 23 00 00 0a 31 13 00 |indow...|.#...1..|
|00002600| 00 00 38 20 41 70 70 41 | 64 6a 75 73 74 4d 65 6e |..8 AppA|djustMen|
|00002610| 75 73 00 00 0a 81 00 00 | 0a 88 0d 00 00 00 39 20 |us......|......9 |
|00002620| 41 70 70 4d 65 6e 75 00 | 00 00 0d ae 00 00 0d b4 |AppMenu.|........|
|00002630| 0b 00 00 31 30 20 41 70 | 70 4e 65 77 00 00 0e 03 |...10 Ap|pNew....|
|00002640| 00 00 0e 0a 0d 00 00 31 | 31 20 41 70 70 4f 70 65 |.......1|1 AppOpe|
|00002650| 6e 00 00 00 0e 86 00 00 | 0e 8e 0d 00 00 31 32 20 |n.......|.....12 |
|00002660| 41 70 70 43 6c 6f 73 65 | 00 00 0f d2 00 00 0f d9 |AppClose|........|
|00002670| 0d 00 00 31 33 20 41 70 | 70 53 61 76 65 00 00 00 |...13 Ap|pSave...|
|00002680| 10 71 00 00 10 7a 0f 00 | 00 31 34 20 41 70 70 53 |.q...z..|.14 AppS|
|00002690| 61 76 65 41 73 00 00 00 | 11 12 00 00 11 1e 11 00 |aveAs...|........|
|000026a0| 00 31 35 20 41 70 70 50 | 61 67 65 53 65 74 75 70 |.15 AppP|ageSetup|
|000026b0| 00 00 11 71 00 00 11 79 | 0d 00 00 31 36 20 41 70 |...q...y|...16 Ap|
|000026c0| 70 50 72 69 6e 74 00 00 | 11 c8 00 00 11 cf 0d 00 |pPrint..|........|
|000026d0| 00 31 37 20 41 70 70 55 | 6e 64 6f 00 00 00 12 1d |.17 AppU|ndo.....|
|000026e0| 00 00 12 23 0b 00 00 31 | 38 20 41 70 70 43 75 74 |...#...1|8 AppCut|
|000026f0| 00 00 12 73 00 00 12 7a | 0d 00 00 31 39 20 41 70 |...s...z|...19 Ap|
|00002700| 70 43 6f 70 79 00 00 00 | 12 df 00 00 12 e7 0d 00 |pCopy...|........|
|00002710| 00 32 30 20 41 70 70 50 | 61 73 74 65 00 00 13 37 |.20 AppP|aste...7|
|00002720| 00 00 13 3f 0d 00 00 32 | 31 20 41 70 70 43 6c 65 |...?...2|1 AppCle|
|00002730| 61 72 00 00 13 ef 00 00 | 13 f6 0d 00 00 32 32 20 |ar......|.....22 |
|00002740| 41 70 70 51 75 69 74 00 | 00 00 14 9b 00 00 14 a5 |AppQuit.|........|
|00002750| 0f 00 00 32 33 20 41 70 | 70 43 6c 65 61 6e 55 70 |...23 Ap|pCleanUp|
|00002760| 00 00 0d 40 00 00 0d 40 | 05 65 6c 73 65 00 00 00 |...@...@|.else...|
|00002770| 00 48 00 09 4d 6f 6e 61 | 63 6f 00 00 00 00 00 00 |.H..Mona|co......|
|00002780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002790| 00 00 00 00 00 03 00 04 | 00 65 00 0e 01 dc 02 7c |........|.e.....||
|000027a0| 00 65 00 0e 01 dc 02 7c | aa c4 64 a0 00 00 02 7b |.e.....||..d....{|
|000027b0| 00 00 02 8f 00 00 00 00 | 01 00 00 00 01 00 00 00 |........|........|
|000027c0| 03 ba 00 00 02 ba 00 00 | 00 66 00 ef 1c e4 1a 14 |........|.f......|
|000027d0| 00 00 00 1c 00 66 00 02 | 42 4b 50 54 00 00 00 1a |.....f..|BKPT....|
|000027e0| 44 54 56 55 00 00 00 26 | 4d 50 53 52 00 01 00 32 |DTVU...&|MPSR...2|
|000027f0| 44 ba ff ff 00 00 00 00 | 00 00 00 00 36 a2 ff ff |D.......|....6...|
|00002800| 00 00 00 0e 00 00 00 00 | 03 ef ff ff 00 00 00 44 |........|.......D|
|00002810| 00 00 00 00 03 ed ff ff | 00 00 02 6e 00 00 00 00 |........|...n....|
|00002820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+