#Com_owner.avEvent
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)
Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Change #vf_elIdn #EventId.Value
Case #vf_elIdn
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 ...
When '= Eventn'
<< Execute subroutine or invoke method to handle event n >>
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.value *ne #Com_Owner.Name'
<< handle the event >>
Endif
Endroutine
|
#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:
- #Com_Owner.avFilterActivated (in a filter)
- #Com_owner.avHandlerActivated (in a command handler)
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 signalled 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=
|
|