The first thing to create is the application directory !TbxMin
. Once created all other files are created under this.
All Toolbox applications need a messages file with two special tags in. Create a file called Messages
with the following contents.
_TaskName:Minimun TBX application _TaskSprite:!tbxmin
Next we want to give the application an icon in the filer view and one to use on the iconbar when the application is run. To do this we create a sprite file !Sprites
that contains a single mode 12 sprite sized 34x17 named !tbxmin. This sprite can be created with !Paint.
All the GUI objects used in the application are defined in the resource file. Using !ResEdit create a new resource file Res
as follows:
We also need to create an obey file !Run
to ensure the Toolbox modules are loaded and launch the application. Create the !Run
with the following contents.
| Run file for TbxMin applicationRMEnsure Toolbox 1.36 RMLoad System:Modules.Toolbox.Toolbox
RMEnsure Toolbox 1.36 Error This application needs Toolbox 1.36 or later. RMEnsure IconBar 0.00 RMLoad System:Modules.Toolbox.IconBar
RMEnsure IconBar 1.12 Error This application needs IconBar 1.12 or later. RMEnsure Menu 0.00 RMLoad System:Modules.Toolbox.Menu RMEnsure Menu 0.24 Error This application needs Menu 0.24 or later. RMEnsure ProgInfo 0.00 RMLoad System:Modules.Toolbox.ProgInfo RMEnsure ProgInfo 0.09 Error This application needs ProgInfo 0.09 or later. Wimpslot -min 2048K -max 2048K
Set TbxMin$Dir <Obey$Dir>
Run <TbxMin$Dir>.!RunImage %*0
![]()
This is a comment line that is ignored when the file is run. | |
All Toolbox applications must ensure the toolbox modules is loaded. The first line loads it if it is not already loaded and the second line checks the version is high enough for this application and reports an error and stops if it is not. | |
The other toolbox modules needed by the application are loaded here. | |
Set the initial size the application requires. C++ programs compiled with GCC will grow the wimpslot as they run if necessary, but you still need enough space allocated to start the program up. The value chosen here "2048" is just a guess it will need to be adjusted (probably to a smaller value) once we have the application finished. | |
This command sets a system variable with the location of this application. It is used so the application knows where to load it resources. | |
This is the line the launches the application. |