Back to Contents        Previous        Next





32. ‘Grubby’ tasks and ’front-ending’

You will sometimes see tasks that load onto the iconbar, but when the icon is clicked on they leave the desktop and monotask. When the user has finished, they are returned to the desktop, with the application still loaded onto the iconbar. Acorn calls these tasks “Grubby tasks”, and they are simple to implement with Dr Wimp.

Alter PROCuser_mouseclick so it has a line like:

CASE window% OF
         WHEN iconbar% :
         PROCwimp_starttask(“BASIC -quit <MyApp$Dir>.Mono”)
ENDCASE


Create a BASIC file called “Mono” inside the !MyApp directory containing the following:

MODE12
PRINT “This is monotasking!”
A$=GET$
*DESKTOP
END


Re-load !MyApp and click on the iconbar icon. Press a key to return to the desktop. Note: change the mode number to one suitable for your monitor.


You will probably want to mangle up the second BASIC file as well as !RunImage with DrWimp to give you more security. This is possible if you don’t use DrWimp in the second BASIC file. Mangle it up with !MakeApp3 in the usual way, and then change the PROCwimp_starttask to something like:

PROCwimp_starttask(“Run <MyApp$Dir>.Mono”)



Similarly, PROCwimp_starttask() opens the door to ‘frontending’ i.e. constructing a simple Wimp program to provide the input/output for routines which are normally based on Command Line operations.







Top of page        Back to Contents        Previous        Next