Iyonix Select Acorn RISCOS 4 Home About Toolbox Examples Maillist Downloads
AppBasic

Toolbar


General
Hello world 1
Hello world 2
Min app
Bin
Window
Slot machine
Drawing
Colour menu
Drawing
Clock

Min app

Min app is an example from the C/C++ package. It was written to demonstrate the reduced requirement for code when the RISC OS Toolbox is used. The AppBasic version runs just as efficiently - the Toolbox modules do all the work - but with a smaller !RunImage file (550 bytes as compared to 5071 for 'C').

You can download the finished application from here
  1. Create a new application (named “MinApp”)
  2. Replace the application's resource file
    Replace the resource file “res” with the one from the C/C++ example MinApp. If you wish you can also replace the ‘!Sprites’ file. At this stage you will have an application which works identically to the original, except that it can only be quit from the Task Manager display.
  3. Edit the iconbar menu
    1. Double-click the iconbar menu's template (named IbarMenu) to display its ResEd representation
      ibarmenu/gif
      IbarMenu
    2. Double-click the Quit entry to open the entry's dialogue box
    3. Replace the Click-action - &1 in the original - with the value &82A91 (the id for the Toolbox event Quit_Quit) quit/gif
  4. N.B. An AppBasic application automatically ceases execution when the Toolbox event
    Quit_Quit=&82A91
    occurs. You don't have to remember the value of the Quit_Quit event - selecting the “green” pencil icon, in its Library page, writes the value at the text caret.
    quit_quit/gif