Home » Archimedes archive » Archimedes World » AW-1992-10.adf » AWOct92 » !AWOct92/Goodies/Wimp/!Tree/!Help
!AWOct92/Goodies/Wimp/!Tree/!Help
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1992-10.adf » AWOct92 |
Filename: | !AWOct92/Goodies/Wimp/!Tree/!Help |
Read OK: | ✔ |
File size: | 0700 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Help for !Tree � Joe Taylor (August 1992) This program illustrates the use of sprites in menu items. Double clicking the application icon places a directory icon on the left-hand icon bar above the text Catalogue. Dragging a directory from a Filer window onto this icon opens an alert box containing the path name of this directory. Clicking on OK in this alert box constructs a directory tree for this directory. A menu tree for this directory is opened at the top left of the monitor screen by clicking on the blue directory icon. Standard half-size icons are used as sprites. (N.B. Only sprites from a standard restricted set are used). Directories lead to further sub menus. Applications are shown as leaves of the tree as are files. Choosing a menu item is equivalent to the command *Run for the object. The cataloguing of the directory is by means of the SYS "OS_GBPB" command; see PROCList. This is not meant to be a particularly serious application although it could be useful on econet where opening large directory trees with lots of applications is time consuming because of sprite loading. "Bugs" 1. Memory can be decreased or increased by changing the value of the variable Memory%; see 1st line of !RunImage. 2. There was a bug connected with empty directories but I think I've now eliminated this. 3. The "Run" action when a menu item is chosen may not be quite as expected. This is not always the fault of the program. For example, An application may have been written in such a way that it only runs successfully by double-clicking in a directory window. (E.g. if the Iconsprite command is only in the !Boot file any sprites may fail to load. It is good programming practice to include this command in the !Run file as well)
00000000 48 65 6c 70 20 66 6f 72 20 21 54 72 65 65 0a 0a |Help for !Tree..| 00000010 a9 20 4a 6f 65 20 54 61 79 6c 6f 72 20 28 41 75 |. Joe Taylor (Au| 00000020 67 75 73 74 20 31 39 39 32 29 0a 0a 54 68 69 73 |gust 1992)..This| 00000030 20 70 72 6f 67 72 61 6d 20 69 6c 6c 75 73 74 72 | program illustr| 00000040 61 74 65 73 20 74 68 65 20 75 73 65 20 6f 66 20 |ates the use of | 00000050 73 70 72 69 74 65 73 20 69 6e 20 6d 65 6e 75 20 |sprites in menu | 00000060 69 74 65 6d 73 2e 0a 0a 44 6f 75 62 6c 65 20 63 |items...Double c| 00000070 6c 69 63 6b 69 6e 67 20 74 68 65 20 61 70 70 6c |licking the appl| 00000080 69 63 61 74 69 6f 6e 20 69 63 6f 6e 20 70 6c 61 |ication icon pla| 00000090 63 65 73 20 61 20 64 69 72 65 63 74 6f 72 79 20 |ces a directory | 000000a0 69 63 6f 6e 20 6f 6e 20 74 68 65 20 6c 65 66 74 |icon on the left| 000000b0 2d 68 61 6e 64 20 69 63 6f 6e 20 62 61 72 20 61 |-hand icon bar a| 000000c0 62 6f 76 65 20 74 68 65 20 74 65 78 74 20 43 61 |bove the text Ca| 000000d0 74 61 6c 6f 67 75 65 2e 0a 0a 44 72 61 67 67 69 |talogue...Draggi| 000000e0 6e 67 20 61 20 64 69 72 65 63 74 6f 72 79 20 66 |ng a directory f| 000000f0 72 6f 6d 20 61 20 46 69 6c 65 72 20 77 69 6e 64 |rom a Filer wind| 00000100 6f 77 20 6f 6e 74 6f 20 74 68 69 73 20 69 63 6f |ow onto this ico| 00000110 6e 20 6f 70 65 6e 73 20 61 6e 20 61 6c 65 72 74 |n opens an alert| 00000120 20 62 6f 78 20 63 6f 6e 74 61 69 6e 69 6e 67 20 | box containing | 00000130 74 68 65 20 70 61 74 68 20 6e 61 6d 65 20 6f 66 |the path name of| 00000140 20 74 68 69 73 20 64 69 72 65 63 74 6f 72 79 2e | this directory.| 00000150 0a 0a 43 6c 69 63 6b 69 6e 67 20 6f 6e 20 4f 4b |..Clicking on OK| 00000160 20 69 6e 20 74 68 69 73 20 61 6c 65 72 74 20 62 | in this alert b| 00000170 6f 78 20 63 6f 6e 73 74 72 75 63 74 73 20 61 20 |ox constructs a | 00000180 64 69 72 65 63 74 6f 72 79 20 74 72 65 65 20 66 |directory tree f| 00000190 6f 72 20 74 68 69 73 20 64 69 72 65 63 74 6f 72 |or this director| 000001a0 79 2e 20 41 20 6d 65 6e 75 20 74 72 65 65 20 66 |y. A menu tree f| 000001b0 6f 72 20 74 68 69 73 20 64 69 72 65 63 74 6f 72 |or this director| 000001c0 79 20 69 73 20 6f 70 65 6e 65 64 20 61 74 20 74 |y is opened at t| 000001d0 68 65 20 74 6f 70 20 6c 65 66 74 20 6f 66 20 74 |he top left of t| 000001e0 68 65 20 6d 6f 6e 69 74 6f 72 20 73 63 72 65 65 |he monitor scree| 000001f0 6e 20 62 79 20 63 6c 69 63 6b 69 6e 67 20 6f 6e |n by clicking on| 00000200 20 74 68 65 20 62 6c 75 65 20 64 69 72 65 63 74 | the blue direct| 00000210 6f 72 79 20 69 63 6f 6e 2e 0a 0a 53 74 61 6e 64 |ory icon...Stand| 00000220 61 72 64 20 68 61 6c 66 2d 73 69 7a 65 20 69 63 |ard half-size ic| 00000230 6f 6e 73 20 61 72 65 20 75 73 65 64 20 61 73 20 |ons are used as | 00000240 73 70 72 69 74 65 73 2e 20 28 4e 2e 42 2e 20 4f |sprites. (N.B. O| 00000250 6e 6c 79 20 73 70 72 69 74 65 73 20 66 72 6f 6d |nly sprites from| 00000260 20 61 20 73 74 61 6e 64 61 72 64 20 72 65 73 74 | a standard rest| 00000270 72 69 63 74 65 64 20 73 65 74 20 61 72 65 20 75 |ricted set are u| 00000280 73 65 64 29 2e 20 44 69 72 65 63 74 6f 72 69 65 |sed). Directorie| 00000290 73 20 6c 65 61 64 20 74 6f 20 66 75 72 74 68 65 |s lead to furthe| 000002a0 72 20 73 75 62 20 6d 65 6e 75 73 2e 0a 41 70 70 |r sub menus..App| 000002b0 6c 69 63 61 74 69 6f 6e 73 20 61 72 65 20 73 68 |lications are sh| 000002c0 6f 77 6e 20 61 73 20 6c 65 61 76 65 73 20 6f 66 |own as leaves of| 000002d0 20 74 68 65 20 74 72 65 65 20 61 73 20 61 72 65 | the tree as are| 000002e0 20 66 69 6c 65 73 2e 0a 0a 43 68 6f 6f 73 69 6e | files...Choosin| 000002f0 67 20 61 20 6d 65 6e 75 20 69 74 65 6d 20 69 73 |g a menu item is| 00000300 20 65 71 75 69 76 61 6c 65 6e 74 20 74 6f 20 74 | equivalent to t| 00000310 68 65 20 63 6f 6d 6d 61 6e 64 20 2a 52 75 6e 20 |he command *Run | 00000320 66 6f 72 20 74 68 65 20 6f 62 6a 65 63 74 2e 0a |for the object..| 00000330 0a 54 68 65 20 63 61 74 61 6c 6f 67 75 69 6e 67 |.The cataloguing| 00000340 20 6f 66 20 74 68 65 20 64 69 72 65 63 74 6f 72 | of the director| 00000350 79 20 69 73 20 62 79 20 6d 65 61 6e 73 20 6f 66 |y is by means of| 00000360 20 74 68 65 20 53 59 53 20 22 4f 53 5f 47 42 50 | the SYS "OS_GBP| 00000370 42 22 20 63 6f 6d 6d 61 6e 64 3b 20 73 65 65 20 |B" command; see | 00000380 50 52 4f 43 4c 69 73 74 2e 0a 0a 54 68 69 73 20 |PROCList...This | 00000390 69 73 20 6e 6f 74 20 6d 65 61 6e 74 20 74 6f 20 |is not meant to | 000003a0 62 65 20 61 20 70 61 72 74 69 63 75 6c 61 72 6c |be a particularl| 000003b0 79 20 73 65 72 69 6f 75 73 20 61 70 70 6c 69 63 |y serious applic| 000003c0 61 74 69 6f 6e 20 61 6c 74 68 6f 75 67 68 20 69 |ation although i| 000003d0 74 20 63 6f 75 6c 64 20 62 65 20 75 73 65 66 75 |t could be usefu| 000003e0 6c 20 6f 6e 20 65 63 6f 6e 65 74 20 77 68 65 72 |l on econet wher| 000003f0 65 20 6f 70 65 6e 69 6e 67 20 6c 61 72 67 65 20 |e opening large | 00000400 64 69 72 65 63 74 6f 72 79 20 74 72 65 65 73 20 |directory trees | 00000410 77 69 74 68 20 6c 6f 74 73 20 6f 66 20 61 70 70 |with lots of app| 00000420 6c 69 63 61 74 69 6f 6e 73 20 69 73 20 74 69 6d |lications is tim| 00000430 65 20 63 6f 6e 73 75 6d 69 6e 67 20 62 65 63 61 |e consuming beca| 00000440 75 73 65 20 6f 66 20 73 70 72 69 74 65 20 6c 6f |use of sprite lo| 00000450 61 64 69 6e 67 2e 0a 0a 22 42 75 67 73 22 0a 0a |ading..."Bugs"..| 00000460 31 2e 20 4d 65 6d 6f 72 79 20 63 61 6e 20 62 65 |1. Memory can be| 00000470 20 64 65 63 72 65 61 73 65 64 20 6f 72 20 69 6e | decreased or in| 00000480 63 72 65 61 73 65 64 20 62 79 20 63 68 61 6e 67 |creased by chang| 00000490 69 6e 67 20 74 68 65 20 76 61 6c 75 65 20 6f 66 |ing the value of| 000004a0 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 4d 65 | the variable Me| 000004b0 6d 6f 72 79 25 3b 20 73 65 65 20 31 73 74 20 6c |mory%; see 1st l| 000004c0 69 6e 65 20 6f 66 20 21 52 75 6e 49 6d 61 67 65 |ine of !RunImage| 000004d0 2e 0a 0a 32 2e 20 54 68 65 72 65 20 77 61 73 20 |...2. There was | 000004e0 61 20 62 75 67 20 63 6f 6e 6e 65 63 74 65 64 20 |a bug connected | 000004f0 77 69 74 68 20 65 6d 70 74 79 20 64 69 72 65 63 |with empty direc| 00000500 74 6f 72 69 65 73 20 62 75 74 20 49 20 74 68 69 |tories but I thi| 00000510 6e 6b 20 49 27 76 65 20 6e 6f 77 20 65 6c 69 6d |nk I've now elim| 00000520 69 6e 61 74 65 64 20 74 68 69 73 2e 0a 0a 33 2e |inated this...3.| 00000530 20 54 68 65 20 22 52 75 6e 22 20 61 63 74 69 6f | The "Run" actio| 00000540 6e 20 77 68 65 6e 20 61 20 6d 65 6e 75 20 69 74 |n when a menu it| 00000550 65 6d 20 69 73 20 63 68 6f 73 65 6e 20 6d 61 79 |em is chosen may| 00000560 20 6e 6f 74 20 62 65 20 71 75 69 74 65 20 61 73 | not be quite as| 00000570 20 65 78 70 65 63 74 65 64 2e 20 20 20 20 20 20 | expected. | 00000580 20 54 68 69 73 20 69 73 20 6e 6f 74 20 61 6c 77 | This is not alw| 00000590 61 79 73 20 74 68 65 20 66 61 75 6c 74 20 6f 66 |ays the fault of| 000005a0 20 74 68 65 20 70 72 6f 67 72 61 6d 2e 20 46 6f | the program. Fo| 000005b0 72 20 65 78 61 6d 70 6c 65 2c 20 41 6e 20 61 70 |r example, An ap| 000005c0 70 6c 69 63 61 74 69 6f 6e 20 20 20 20 20 20 20 |plication | 000005d0 20 6d 61 79 20 68 61 76 65 20 62 65 65 6e 20 77 | may have been w| 000005e0 72 69 74 74 65 6e 20 69 6e 20 73 75 63 68 20 61 |ritten in such a| 000005f0 20 77 61 79 20 74 68 61 74 20 69 74 20 6f 6e 6c | way that it onl| 00000600 79 20 72 75 6e 73 20 73 75 63 63 65 73 73 66 75 |y runs successfu| 00000610 6c 6c 79 20 62 79 20 20 20 20 20 20 20 20 20 20 |lly by | 00000620 20 64 6f 75 62 6c 65 2d 63 6c 69 63 6b 69 6e 67 | double-clicking| 00000630 20 69 6e 20 61 20 64 69 72 65 63 74 6f 72 79 20 | in a directory | 00000640 77 69 6e 64 6f 77 2e 20 28 45 2e 67 2e 20 69 66 |window. (E.g. if| 00000650 20 74 68 65 20 49 63 6f 6e 73 70 72 69 74 65 20 | the Iconsprite | 00000660 63 6f 6d 6d 61 6e 64 20 69 73 20 20 20 20 20 20 |command is | 00000670 20 6f 6e 6c 79 20 69 6e 20 74 68 65 20 21 42 6f | only in the !Bo| 00000680 6f 74 20 66 69 6c 65 20 61 6e 79 20 73 70 72 69 |ot file any spri| 00000690 74 65 73 20 6d 61 79 20 66 61 69 6c 20 74 6f 20 |tes may fail to | 000006a0 6c 6f 61 64 2e 20 49 74 20 69 73 20 67 6f 6f 64 |load. It is good| 000006b0 20 70 72 6f 67 72 61 6d 6d 69 6e 67 20 20 20 20 | programming | 000006c0 20 70 72 61 63 74 69 63 65 20 74 6f 20 69 6e 63 | practice to inc| 000006d0 6c 75 64 65 20 74 68 69 73 20 63 6f 6d 6d 61 6e |lude this comman| 000006e0 64 20 69 6e 20 74 68 65 20 21 52 75 6e 20 66 69 |d in the !Run fi| 000006f0 6c 65 20 61 73 20 77 65 6c 6c 29 0a 0a 0a 20 0a |le as well)... .| 00000700