[Gbbopen-list] Losing events
Dan Corkill
corkill at gbbopen.org
Fri Mar 30 10:19:10 EDT 2007
> MY-OTHER-EVENT
> > STANDARD-UNIT-INSTANCE
> > Triggers: MY-KS
> > MY-UNIT-CLASS-X
> > Triggers: MY-KS
> > MY-UNIT-CLASS-Y
> > Triggers: MY-KS
> > <a long list like this>
> >
> >
>
> I guess I'm not sure how to read that. Is it saying that
> * make-instance of any unit-class is triggering my-ks?
> * (signal-event 'my-other-event) triggers unrelated kss?
The above means that MY-KS will be triggered on all MY-OTHER-EVENT (an
event of "type" instance-event) events that are signaled with unit
instances of class STANDARD-UNIT-INSTANCE, or MY-UNIT-CLASS-X, or
MY-UNIT-CLASS-Y, ...
When you signal MY-OTHER-EVENT, you need to do so with a unit-instance
argument.
> Changing to
> (define-event-class my-other-event (non-instance-event) ...)
> in the running environment seems to remove any mention of my-other-event
> from the output of describe-all-event-functions.
> Reloading all into a fresh environment arranges things such that
> describe-all-event-functions says my-other-event triggers only my-ks.
>
> MY-OTHER-EVENT
> Triggers: MY-KS
Now your MY-OTHER-EVENT is of "type" non-instance event, so it has no
unit-class qualification. When you signal MY-OTHER-EVENT now, you do so
without a unit-instance argument.
The central notion to all this is that there are 5 "types" or event
metaclasses of events (see the table in the define-event-class
documentation). These event metaclasses are distinguished by the event
qualifiers that are required by the all the event classes (GBBopen or
user-defined) in each event metaclass. When you define an event class,
it is a new event in one of these 5 event metaclasses, which affects
event functions, event signaling, and KS triggering/retriggering/obviation.
> If this all correct as you describe, how should I expand the
> :trigger-events to be more specific.
You specify it with the unit-class(es) that qualify the instance
event-metaclass event. For example, if MY-OTHER-EVENT is a subclass of
SINGLE-INSTANCE-EVENT (an event of metaclass INSTANCE) you could specify:
:trigger-events ((my-other-event my-unit-class-x))
or
:trigger-events ((my-other-event my-unit-class-x) (my-other-event
my-unit-class-y))
Specifying:
:trigger-events ((my-other-event))
means the KS will be triggered on MY-OTHER-EVENTS signaled with any unit
instance.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Gbbopen-list
mailing list