GEOS SDK TechDocs
|
|
2 Common Behavior
|
2.2 State Information
Often, each list object will contain an "apply" message. This message will be sent out when the list's state has changed and the new state should be applied in the application. For example, a list of colors ("Red", "Green", and "Blue") may have a message
MSG_GEN_VIEW_SET_COLOR
that sets the background color of a GenView. Changing the state of the list (by selecting an item) will cause this notification message to be sent to the view. More typically, though, the apply message will be sent to the application or a controller object.
Alternatively, you could forego including an apply message in the list object's instance data. In this case, whenever the object receives a
MSG_GEN_APPLY
it would query the state of its children and act upon that state.
When the user makes a selection, the apply action may or may not be sent out immediately, depending on the operating mode of the list. GenItemGroups, GenBooleanGroups, and GenDynamicLists may operate in one of two modes: immediate or delayed. (For a more complete discussion of delayed and immediate modes, see the GenInteractionClass chapter.) Typically, a list object will operate in delayed mode if it is placed within a GIT_PROPERTIES Interaction. Other generic objects such as GenInteractions, GenTexts, and GenValues also utilize delayed and immediate mode.
In immediate mode, any changes made in the list's state are reflected immediately in the application. If the user changes an immediate mode list object concerning a text style change, the text style of the current selection will change immediately. Changing the state of the list will cause the apply action associated with that object to be sent out immediately.
In delayed mode, any changes made in the list's state are not reflected until some later time, when the changes are "applied." This apply may be effected by the user (through an "apply" trigger) or by the application when it deems it appropriate. In delayed mode, the notification message will not be sent on changes to the state of the list but only when the list receives notice to apply the changes.
Occasionally, a list operating in delayed mode may wish to send out a different message whenever the user changes its state, even if that change should not be immediately applied. In this case, you can supply a status message for the object to send to the destination whenever the user makes changes within the list group.
Each list must have a destination to send its apply action and, if needed, status messages to. This destination can be any object or process capable of handling the message.
GEOS SDK TechDocs
|
|
2 Common Behavior
|
2.2 State Information