Some things worth knowing about handling the avEvent event are:
Withid |
Identifies the event. Structurally a good way to handle arriving events to use code like this: Evtroutine Handling(#Com_owner.avEvent) WithId(#EventId)
Case #EventId.Value When (= Event1) << Execute subroutine or invoke method to handle event 1 >> When (= Event2) << Execute subroutine or invoke method to handle event 2 >> When (= Event3) << Execute subroutine or invoke method to handle event 3 >> ... etc ... ... etc ... ... etc ... EndCase
Endroutine
|
WithAInfo1 -> WithAInfo5 |
Use these to receive the SendAInfo1 -> SendAInfo5 values specified when the event was signaled. |
WithNInfo1 -> WithNInfo5 |
Use these to receive the SendNInfo1 -> SendNInfo5 values specified when the event was signaled. |
Sender |
Use this to determine the name of the component that signaled the event. This is most commonly used like this …. EvtRoutine Handling(#Com_owner.avEvent) Sender(#Sender)
* If this event was not signaled by this component itself
If (#Sender *ne #Com_Owner.Name)
<< handle the event >>
Endif
Endroutine In VLF-ONE the same logic can be achieved by using the NotifySelf(False) parameter. |
#Com_Owner.avFilterActivated and #Com_Owner.avHandlerActivated
|
Filters and Command Handlers have properties that indicate whether they are currently considered to be activated. These are:
These properties contain strings TRUE or FALSE. They allow logic in a filter or command handler to test whether it is currently in an activated state. Typically this is used to test whether signaled events should be ignored. A filter or command handler is activated if it is in a state where a user may be able to interact with it. A filter or command handler in a minimized, hidden or deactivated window may still be considered to be activated. |
You should only check for events that your program is interested in.
Other events should be ignored as quickly as possible.
As you are implementing your application you may find it useful to maintain a table of events like this example:
Event Id | Notified To | Waits for Completion | Additional Alphanumeric Information | Additional Numeric Information |
_____________ |
FRAMEWORK BUSINESSOBJECT |
TRUE / FALSE |
1= 2= 3= 4= 5= |
1= 2= 3= 4= 5= |
_____________ |
FRAMEWORK BUSINESSOBJECT |
TRUE / FALSE |
1= 2= 3= 4= 5= |
1= 2= 3= 4= 5= |
_____________ |
FRAMEWORK BUSINESSOBJECT |
TRUE / FALSE |
1= 2= 3= 4= 5= |
1= 2= 3= 4= 5= |