home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Example Projects / Reusable Classes_Code / ResourceWizard < prev   
Unknown  |  2000-04-12  |  2.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 06 4d 6f 64 75 6c 65 0e | 52 65 73 6f 75 72 63 65 |.Module.|Resource|
|00000010| 57 69 7a 61 72 64 03 2a | bb 0f bb 0b 07 00 0e 52 |Wizard.*|.......R|
|00000020| 65 73 6f 75 72 63 65 57 | 69 7a 61 72 64 28 00 00 |esourceW|izard(..|
|00000030| 04 15 43 61 63 68 65 64 | 53 6e 64 28 30 29 20 61 |..Cached|Snd(0) a|
|00000040| 73 20 73 6f 75 6e 64 01 | 18 43 61 63 68 65 64 43 |s sound.|.CachedC|
|00000050| 69 63 6e 28 30 29 20 61 | 73 20 70 69 63 74 75 72 |icn(0) a|s pictur|
|00000060| 65 01 17 49 6e 64 65 78 | 43 69 63 6e 28 30 29 20 |e..Index|Cicn(0) |
|00000070| 61 73 20 69 6e 74 65 67 | 65 72 01 16 49 6e 64 65 |as integ|er..Inde|
|00000080| 78 53 6e 64 28 30 29 20 | 61 73 20 69 6e 74 65 67 |xSnd(0) |as integ|
|00000090| 65 72 01 02 08 4c 6f 61 | 64 43 69 63 6e 10 49 6e |er...Loa|dCicn.In|
|000000a0| 64 65 78 20 61 73 20 69 | 6e 74 65 67 65 72 07 70 |dex as i|nteger.p|
|000000b0| 69 63 74 75 72 65 00 0a | 20 0a 20 29 2e 46 75 6e |icture..| . ).Fun|
|000000c0| 63 74 69 6f 6e 20 4c 6f | 61 64 43 69 63 6e 28 49 |ction Lo|adCicn(I|
|000000d0| 6e 64 65 78 20 61 73 20 | 69 6e 74 65 67 65 72 29 |ndex as |integer)|
|000000e0| 20 41 73 20 70 69 63 74 | 75 72 65 00 15 64 69 6d | As pict|ure..dim|
|000000f0| 20 57 61 6c 6b 65 72 20 | 61 73 20 69 6e 74 65 67 | Walker |as integ|
|00000100| 65 72 16 64 69 6d 20 47 | 6f 74 43 69 63 6e 20 61 |er.dim G|otCicn a|
|00000110| 73 20 70 69 63 74 75 72 | 65 1a 64 69 6d 20 4c 6f |s pictur|e.dim Lo|
|00000120| 61 64 46 69 6c 65 20 61 | 73 20 46 6f 6c 64 65 72 |adFile a|s Folder|
|00000130| 49 74 65 6d 18 64 69 6d | 20 46 6f 72 6b 20 61 73 |Item.dim| Fork as|
|00000140| 20 52 65 73 6f 75 72 63 | 65 46 6f 72 6b 00 00 28 | Resourc|eFork..(|
|00000150| 47 6f 74 43 69 63 6e 3d | 6e 69 6c 20 20 2f 2f 20 |GotCicn=|nil // |
|00000160| 20 66 69 72 73 74 20 6c | 6f 6f 6b 20 69 6e 20 74 | first l|ook in t|
|00000170| 68 65 20 63 61 63 68 65 | 08 57 61 6c 6b 65 72 3d |he cache|.Walker=|
|00000180| 31 32 64 6f 20 75 6e 74 | 69 6c 20 47 6f 74 43 69 |12do unt|il GotCi|
|00000190| 63 6e 3c 3e 6e 69 6c 20 | 6f 72 20 57 61 6c 6b 65 |cn<>nil |or Walke|
|000001a0| 72 3e 55 62 6f 75 6e 64 | 28 43 61 63 68 65 64 43 |r>Ubound|(CachedC|
|000001b0| 69 63 6e 29 1f 69 66 20 | 49 6e 64 65 78 43 69 63 |icn).if |IndexCic|
|000001c0| 6e 28 57 61 6c 6b 65 72 | 29 3d 49 6e 64 65 78 20 |n(Walker|)=Index |
|000001d0| 74 68 65 6e 1a 47 6f 74 | 43 69 63 6e 3d 43 61 63 |then.Got|Cicn=Cac|
|000001e0| 68 65 64 43 69 63 6e 28 | 57 61 6c 6b 65 72 29 04 |hedCicn(|Walker).|
|000001f0| 65 6c 73 65 0f 57 61 6c | 6b 65 72 3d 57 61 6c 6b |else.Wal|ker=Walk|
|00000200| 65 72 2b 31 06 65 6e 64 | 20 69 66 04 6c 6f 6f 70 |er+1.end| if.loop|
|00000210| 8c 01 69 66 20 47 6f 74 | 43 69 63 6e 3d 6e 69 6c |..if Got|Cicn=nil|
|00000220| 20 74 68 65 6e 20 20 2f | 2f 20 20 64 69 64 20 6e | then /|/ did n|
|00000230| 6f 74 20 66 69 6e 64 20 | 69 74 20 69 6e 20 6f 75 |ot find |it in ou|
|00000240| 72 20 63 61 63 68 65 2c | 20 74 72 79 20 6f 75 72 |r cache,| try our|
|00000250| 20 61 70 70 20 72 65 73 | 6f 75 72 63 65 73 15 46 | app res|ources.F|
|00000260| 6f 72 6b 3d 41 70 70 2e | 52 65 73 6f 75 72 63 65 |ork=App.|Resource|
|00000270| 46 6f 72 6b 11 69 66 20 | 46 6f 72 6b 3c 3e 6e 69 |Fork.if |Fork<>ni|
|00000280| 6c 20 74 68 65 6e 1b 47 | 6f 74 43 69 63 6e 3d 46 |l then.G|otCicn=F|
|00000290| 6f 72 6b 2e 47 65 74 43 | 69 63 6e 28 49 6e 64 65 |ork.GetC|icn(Inde|
|000002a0| 78 29 06 65 6e 64 20 69 | 66 91 01 69 66 20 47 6f |x).end i|f..if Go|
|000002b0| 74 43 69 63 6e 3d 6e 69 | 6c 20 74 68 65 6e 20 20 |tCicn=ni|l then |
|000002c0| 2f 2f 20 20 64 69 64 20 | 6e 6f 74 20 66 69 6e 64 |// did |not find|
|000002d0| 20 69 74 20 69 6e 20 6f | 75 72 20 61 70 70 20 72 | it in o|ur app r|
|000002e0| 65 73 6f 75 72 63 65 2c | 20 74 72 79 20 55 73 65 |esource,| try Use|
|000002f0| 72 20 49 63 6f 6e 73 20 | 66 69 6c 65 24 4c 6f 61 |r Icons |file$Loa|
|00000300| 64 46 69 6c 65 3d 47 65 | 74 46 6f 6c 64 65 72 49 |dFile=Ge|tFolderI|
|00000310| 74 65 6d 28 22 55 73 65 | 72 20 49 63 6f 6e 73 22 |tem("Use|r Icons"|
|00000320| 29 29 69 66 20 4c 6f 61 | 64 46 69 6c 65 3c 3e 6e |))if Loa|dFile<>n|
|00000330| 69 6c 20 61 6e 64 20 4c | 6f 61 64 46 69 6c 65 2e |il and L|oadFile.|
|00000340| 65 78 69 73 74 73 20 74 | 68 65 6e 1e 46 6f 72 6b |exists t|hen.Fork|
|00000350| 3d 4c 6f 61 64 46 69 6c | 65 2e 4f 70 65 6e 52 65 |=LoadFil|e.OpenRe|
|00000360| 73 6f 75 72 63 65 46 6f | 72 6b 11 69 66 20 46 6f |sourceFo|rk.if Fo|
|00000370| 72 6b 3c 3e 6e 69 6c 20 | 74 68 65 6e 1b 47 6f 74 |rk<>nil |then.Got|
|00000380| 43 69 63 6e 3d 46 6f 72 | 6b 2e 47 65 74 43 69 63 |Cicn=For|k.GetCic|
|00000390| 6e 28 49 6e 64 65 78 29 | 0a 46 6f 72 6b 2e 63 6c |n(Index)|.Fork.cl|
|000003a0| 6f 73 65 06 65 6e 64 20 | 69 66 06 65 6e 64 20 69 |ose.end |if.end i|
|000003b0| 66 06 65 6e 64 20 69 66 | 2d 69 66 20 47 6f 74 43 |f.end if|-if GotC|
|000003c0| 69 63 6e 3c 3e 6e 69 6c | 20 74 68 65 6e 20 20 2f |icn<>nil| then /|
|000003d0| 2f 20 20 61 64 64 20 69 | 74 20 74 6f 20 74 68 65 |/ add i|t to the|
|000003e0| 20 63 61 63 68 65 19 43 | 61 63 68 65 64 43 69 63 | cache.C|achedCic|
|000003f0| 6e 2e 41 70 70 65 6e 64 | 20 47 6f 74 43 69 63 6e |n.Append| GotCicn|
|00000400| 16 49 6e 64 65 78 43 69 | 63 6e 2e 41 70 70 65 6e |.IndexCi|cn.Appen|
|00000410| 64 20 49 6e 64 65 78 06 | 65 6e 64 20 69 66 06 65 |d Index.|end if.e|
|00000420| 6e 64 20 69 66 0e 72 65 | 74 75 72 6e 20 47 6f 74 |nd if.re|turn Got|
|00000430| 43 69 63 6e 00 00 0c 45 | 6e 64 20 46 75 6e 63 74 |Cicn...E|nd Funct|
|00000440| 69 6f 6e 07 50 6c 61 79 | 53 6e 64 10 49 6e 64 65 |ion.Play|Snd.Inde|
|00000450| 78 20 61 73 20 69 6e 74 | 65 67 65 72 00 00 27 06 |x as int|eger..'.|
|00000460| 27 06 2b 1d 53 75 62 20 | 50 6c 61 79 53 6e 64 28 |'.+.Sub |PlaySnd(|
|00000470| 49 6e 64 65 78 20 61 73 | 20 69 6e 74 65 67 65 72 |Index as| integer|
|00000480| 29 00 15 64 69 6d 20 57 | 61 6c 6b 65 72 20 61 73 |)..dim W|alker as|
|00000490| 20 69 6e 74 65 67 65 72 | 13 64 69 6d 20 47 6f 74 | integer|.dim Got|
|000004a0| 53 6e 64 20 61 73 20 73 | 6f 75 6e 64 1a 64 69 6d |Snd as s|ound.dim|
|000004b0| 20 4c 6f 61 64 46 69 6c | 65 20 61 73 20 46 6f 6c | LoadFil|e as Fol|
|000004c0| 64 65 72 49 74 65 6d 18 | 64 69 6d 20 46 6f 72 6b |derItem.|dim Fork|
|000004d0| 20 61 73 20 52 65 73 6f | 75 72 63 65 46 6f 72 6b | as Reso|urceFork|
|000004e0| 00 00 27 47 6f 74 53 6e | 64 3d 6e 69 6c 20 20 2f |..'GotSn|d=nil /|
|000004f0| 2f 20 20 66 69 72 73 74 | 20 6c 6f 6f 6b 20 69 6e |/ first| look in|
|00000500| 20 74 68 65 20 63 61 63 | 68 65 08 57 61 6c 6b 65 | the cac|he.Walke|
|00000510| 72 3d 31 30 64 6f 20 75 | 6e 74 69 6c 20 47 6f 74 |r=10do u|ntil Got|
|00000520| 53 6e 64 3c 3e 6e 69 6c | 20 6f 72 20 57 61 6c 6b |Snd<>nil| or Walk|
|00000530| 65 72 3e 55 62 6f 75 6e | 64 28 43 61 63 68 65 64 |er>Uboun|d(Cached|
|00000540| 53 6e 64 29 1e 69 66 20 | 49 6e 64 65 78 53 6e 64 |Snd).if |IndexSnd|
|00000550| 28 57 61 6c 6b 65 72 29 | 3d 49 6e 64 65 78 20 74 |(Walker)|=Index t|
|00000560| 68 65 6e 18 47 6f 74 53 | 6e 64 3d 43 61 63 68 65 |hen.GotS|nd=Cache|
|00000570| 64 53 6e 64 28 57 61 6c | 6b 65 72 29 04 65 6c 73 |dSnd(Wal|ker).els|
|00000580| 65 0f 57 61 6c 6b 65 72 | 3d 57 61 6c 6b 65 72 2b |e.Walker|=Walker+|
|00000590| 31 06 65 6e 64 20 69 66 | 04 6c 6f 6f 70 8b 01 69 |1.end if|.loop..i|
|000005a0| 66 20 47 6f 74 53 6e 64 | 3d 6e 69 6c 20 74 68 65 |f GotSnd|=nil the|
|000005b0| 6e 20 20 2f 2f 20 20 64 | 69 64 20 6e 6f 74 20 66 |n // d|id not f|
|000005c0| 69 6e 64 20 69 74 20 69 | 6e 20 6f 75 72 20 63 61 |ind it i|n our ca|
|000005d0| 63 68 65 2c 20 74 72 79 | 20 6f 75 72 20 61 70 70 |che, try| our app|
|000005e0| 20 72 65 73 6f 75 72 63 | 65 73 15 46 6f 72 6b 3d | resourc|es.Fork=|
|000005f0| 41 70 70 2e 52 65 73 6f | 75 72 63 65 46 6f 72 6b |App.Reso|urceFork|
|00000600| 11 69 66 20 46 6f 72 6b | 3c 3e 6e 69 6c 20 74 68 |.if Fork|<>nil th|
|00000610| 65 6e 1b 47 6f 74 53 6e | 64 3d 46 6f 72 6b 2e 47 |en.GotSn|d=Fork.G|
|00000620| 65 74 53 6f 75 6e 64 28 | 49 6e 64 65 78 29 06 65 |etSound(|Index).e|
|00000630| 6e 64 20 69 66 90 01 69 | 66 20 47 6f 74 53 6e 64 |nd if..i|f GotSnd|
|00000640| 3d 6e 69 6c 20 74 68 65 | 6e 20 20 2f 2f 20 20 64 |=nil the|n // d|
|00000650| 69 64 20 6e 6f 74 20 66 | 69 6e 64 20 69 74 20 69 |id not f|ind it i|
|00000660| 6e 20 6f 75 72 20 61 70 | 70 20 72 65 73 6f 75 72 |n our ap|p resour|
|00000670| 63 65 2c 20 74 72 79 20 | 55 73 65 72 20 49 63 6f |ce, try |User Ico|
|00000680| 6e 73 20 66 69 6c 65 24 | 4c 6f 61 64 46 69 6c 65 |ns file$|LoadFile|
|00000690| 3d 47 65 74 46 6f 6c 64 | 65 72 49 74 65 6d 28 22 |=GetFold|erItem("|
|000006a0| 55 73 65 72 20 49 63 6f | 6e 73 22 29 29 69 66 20 |User Ico|ns"))if |
|000006b0| 4c 6f 61 64 46 69 6c 65 | 3c 3e 6e 69 6c 20 61 6e |LoadFile|<>nil an|
|000006c0| 64 20 4c 6f 61 64 46 69 | 6c 65 2e 65 78 69 73 74 |d LoadFi|le.exist|
|000006d0| 73 20 74 68 65 6e 1e 46 | 6f 72 6b 3d 4c 6f 61 64 |s then.F|ork=Load|
|000006e0| 46 69 6c 65 2e 4f 70 65 | 6e 52 65 73 6f 75 72 63 |File.Ope|nResourc|
|000006f0| 65 46 6f 72 6b 11 69 66 | 20 46 6f 72 6b 3c 3e 6e |eFork.if| Fork<>n|
|00000700| 69 6c 20 74 68 65 6e 1b | 47 6f 74 53 6e 64 3d 46 |il then.|GotSnd=F|
|00000710| 6f 72 6b 2e 47 65 74 53 | 6f 75 6e 64 28 49 6e 64 |ork.GetS|ound(Ind|
|00000720| 65 78 29 0a 46 6f 72 6b | 2e 63 6c 6f 73 65 06 65 |ex).Fork|.close.e|
|00000730| 6e 64 20 69 66 06 65 6e | 64 20 69 66 06 65 6e 64 |nd if.en|d if.end|
|00000740| 20 69 66 2c 69 66 20 47 | 6f 74 53 6e 64 3c 3e 6e | if,if G|otSnd<>n|
|00000750| 69 6c 20 74 68 65 6e 20 | 20 2f 2f 20 20 61 64 64 |il then | // add|
|00000760| 20 69 74 20 74 6f 20 74 | 68 65 20 63 61 63 68 65 | it to t|he cache|
|00000770| 17 43 61 63 68 65 64 53 | 6e 64 2e 41 70 70 65 6e |.CachedS|nd.Appen|
|00000780| 64 20 47 6f 74 53 6e 64 | 15 49 6e 64 65 78 53 6e |d GotSnd|.IndexSn|
|00000790| 64 2e 41 70 70 65 6e 64 | 20 49 6e 64 65 78 06 65 |d.Append| Index.e|
|000007a0| 6e 64 20 69 66 06 65 6e | 64 20 69 66 13 69 66 20 |nd if.en|d if.if |
|000007b0| 47 6f 74 53 6e 64 3c 3e | 6e 69 6c 20 74 68 65 6e |GotSnd<>|nil then|
|000007c0| 0b 47 6f 74 53 6e 64 2e | 50 6c 61 79 06 65 6e 64 |.GotSnd.|Play.end|
|000007d0| 20 69 66 00 00 07 45 6e | 64 20 53 75 62 00 00 00 | if...En|d Sub...|
|000007e0| 00 00 | |.. | |
+--------+-------------------------+-------------------------+--------+--------+