OnUpdate - cCJStatusBar
Event that is called as part of the commandbar system's update process
Type: Event
Syntax
Procedure OnUpdate
Description
OnUpdate is called as part of the cCJCommandBarSystem's Update process. This event is usually triggered by the idle timer and is used to update the statusbar on a dynamic basis.
When dynamic updates are enabled (see pbTimerUpdate) the idle timer will send Update to the cCJCommandBarSystem, which will cause the private Update message to be sent to the statusbar object. Update simply sends the OnUpdate event.
Note that OnUpdate is sent to the Statusbar object and it is not sent to the statusbar panes. It is expected that you will update the panes as needed from the statusbar object.
Sample
This example we will use OnUpdate to enable and disable a "changed" status pane based on the changed state of the view's data dictionary. To do this we will get the state of the data entry object by calling the cCJCommandBarSystem function DEOInformation. This will check the DEO status of the focus object. If it is a DEO that has a DDO that is changed, we will enable the pane by setting pbStyleDisabled to False.
The statusbar pane object will appear as follows:
Object oStatusPaneChanged is a cCJStatusBarPane
Set psText to "Changed"
End_Object
OnUpdate within the statusbar object will be:
Procedure OnUpdate
Handle hoServer
Boolean bHasRecord bChanged bHasIndex bIsDeo
Forward Send OnUpdate
Get DEOInformation (&hoServer) (&bHasRecord) (&bChanged) (&bHasIndex) to bIsDeo
Set pbStyleDisabled of oStatusPaneChanged to (not(bIsDEO and hoServer and bChanged))
End_Procedure