Satimage Previous
Using Smile's dictionary
Home Documentation Smile Smile's objects Using Smile's dictionary  
How to open the dictionary of Smile
To open the dictionary of Smile, instead of using the regular File ▸ Open dictionary menu item, it is faster to select Smile ▸ Smile dictionary.

The dictionary presents the definitions of the commands (verbs), and the exhaustive description of the classes of objects. An object owns properties, which are fields containing some data such as the object's name or its bounds, and elements, other objects that it may contain: the dictionary provides for each class the list of its properties, and what classes of objects it accepts as its elements.

The dictionary of Smile is organized into "Suites". To view the different Suites of the dictionary, pull down the Index menu in the window of the dictionary of Smile.
The Smile events
Of particular interest when you script Smile is the "Smile events" Suite. The Smile events are the events that Smile will send to the objects - more precisely to the scripts of the objects - in various circumstances. For instance, when Smile opens a dialog, the script of the dialog receives a prepare event: if you want to perform some specific initialization when the dialog opens, you will provide a on prepare the_dialog handler in the script of the dialog:
on prepare the_dialog
    set contained data of dialog item 1 of the_dialog to "Ready" -- initialize the display field
    set name of dialog item 2 of the_dialog to "Start" -- set up button's name
    set visible of dialog item 3 of the_dialog to false -- hide the progress bar
end prepare

Some of the Smile events are sent to all objects, while some are sent only to some specific classes of objects.
prepare, do menu, store, close and delete
may be sent to all classes of object
click in
sent to dialogs
activated and deactivated
sent to windows
drop and export
sent to those widgets in dialogs which handle drag & drop
pick in, keydown and resized
sent to graphic windows or to the objects that a graphic windows may contain.
Copyright ©2008 Paris, Satimage