The fieldsactions library defines the actions related to the events, related to the interfaceObjects, described in the fields library.
Remember that in order to utilize this extension to Lidskjalv, the fragment fieldsactions must be included as follows:
ORIGIN '~beta/guienv/guienv'; INCLUDE '~beta/guienv/fieldsactions' --- program: descriptor --- guienv(# bca: @beforeChangeAction; ... do ... bca[] -> appendAction; ... #)
This example illustrates how a beforeChangeAction can be udes to 'eat' every second keystroke in a textField.
ORIGIN '~beta/guienv/guienv'; INCLUDE '~beta/guienv/fields'; INCLUDE '~beta/guienv/fieldsactions'; INCLUDE '~beta/guienv/controls'; (* This is a silly demo that shows how a beforeChangeAction can be * used to 'eat' every second keystroke in a textField. *) --- program: descriptor --- guienv (# allowEdit: @boolean; theWindow: @window (# theTextField: @textField (# aBeforeChangeAction: @beforeChangeAction (# do not allowEdit -> allowEdit #); eventHandler:: (# onBeforeChange:: (# do allowEdit -> allow #); #); open:: (# do true -> bindBottom -> bindRight; aBeforeChangeAction[] -> appendAction #) #); eventhandler:: (# onAboutToClose:: (# do terminate #) #); open:: (# do 'BeforeChangeAction Demo' -> title; (40,40) -> position; (300,300) -> size; true -> allowEdit; theTextfield.open; (300,300) -> theTextfield.size #) #) do theWindow.open #)
Lidskjalv: User Interface Framework - Reference Manual | © 1994-2002 Mjølner Informatics |
[Modified: Friday October 27th 2000 at 14:56]
|