Toolbox Events
Fundamental event-handler
Toolbox events are the main type of event which AppBasic applications deal with. They are at a higher level of abstraction than Wimp events and always call the fundamental event-handling procedure:
PROCDealWith_ToolboxEvent(event,object,component)
Programming this event-handler is exactly as specified in the Toolbox manual.
Specialist event-handlers
To allow for greater ease of program organisation, when a Toolbox event occurs in objects of a particular class, AppBasic also calls a specialist event-handler of the form
PROCDealWith_Class(event,object,component)
where Class is one of the object-classes (e.g. 'Menu','Window', etc). For example,
DEF PROCDealWith_Menu(event,object,component)
CASE event OF
WHEN Menu_AboutToBeShown
WHEN Menu_HasBeenHidden
WHEN Menu_SubMenu
WHEN Menu_Selection
ENDCASE
ENDPROC
|
is the specialist event-handler called when an event occurs in an object of class Menu. It is up to the programmer to decide whether to deal with a Toolbox event in the definition of its specialist handler or the generic handler.
N.B. In an AppBasic application the numerical value of the standard Toolbox event ids are automatically assigned to variables with the same name as the event.
|