The script editors provide an IntelliSense(tm)-like help mechanism that you can use to prompt you for the methods which can be used and their arguments. Typing Ctrl-H in a script editor will bring up the help popup if Rekall can deternine what to display. Alternatively, enabling the auto-display script help option in the Scripts and Macros section of the Options dialog will display the help popup immediately after typing a period character.
For example, suppose you are entering the code for a button onClick event:
def eventFunc (button) : button. |
Immidialtely after typing the period (if auto-display script help is set), or after typing Ctrl-H after the period, the popup will be displayed showing the methods that are applicable to buttons. Rekall knows to show the button methods, even though python is a dynamically types language (hence, a variable named button need not actually be a button) since it knows that the event function is for a button event, and that the first argument to eventFunc() is a button (so if you replaced button with label, you'd still get the button methods).
Rekall does its best to work out the type of the object to with the method applies. For instance, consider:
def eventFunc (button) : button. __block__. |
In this case, button.__block__ must be a block, and more specifically, a form block, so the methods appropriate to a form block are displayed (or maybe for a form if the button is nested directly inside the form-level block). It can also handle:
def eventFunc (button) : button.getNamedCtrl('../surname'). |
by determining the type control referred to by button.getNamedCtrl('../surname'). For instance, if, as is likely, it is a field, then the methods for a field will be displayed. Generall speaking, Rekall attempts to work along the line of code preceeding the period, to track down the appropriate object. Sometimes, however, this cannot work, for example:
def eventFunc (button) : surname = button.getNamedCtrl('../surname') surname. |
In this case, Rekall cannot work out the object type associated with surname (well, it maybe could, but this could get very complicated). To get around this, provided that you are prepared to stick to a naming convention, you can write:
def eventFunc (button) : fldSurname = button.getNamedCtrl('../surname') fldSurname. |
Since Rekall cannot actually work out the type of fldSurname, it takes the fld prefix to indicate that this is a field. The complete set of recognised prefixes is:
btn | button |
chk | checkbox |
cho | choice |
cnt | container |
fld | field |
frm | form |
blk | block: form or report as appropriate |
lbl | label |
lnk | link |
lbx | listbox |
stk | stack |
tab | tabber |