






|
Toolbox methods
At run-time, the client application manipulates its objects by using ‘methods’. Toolbox methods are implemented as SWIs which, when called, are dispatched to the appropriate module which implements the class of object to which the method is being applied. As an alternative, AppBasic provides a library of procedures (veneers) which call the SWI for you. This library is automatically loaded by the edit-form of an application - any unused procedures are automatically removed when the application is compressed.
For example, to place a tick against a menu entry, we could write
SYS &44EC6,,object,0,component,1 : REM Menu_SetTick
or
PROCMenu_SetTick(object,component,1)
where object and component are the id's of the menu and entry respectively.
Toolbox methods library
The available Toolbox methods are listed in StrongHelp manuals which are accessed by selecting an icon in the Toolbox library pane. Selecting an icon displays the list of methods, events and handlers associated with that class of object.

Toolbox methods for Menu objects
Selecting a link to a Toolbox method displays a page giving information about the method.
To write the method in a text editor window, place the caret in the window and select a “pencil” icon

Writing a Toolbox method
Selecting the “blue” pencil-icon will write the veneer whereas the “green” writes the SWI.
|