[Gbbopen-list] Losing events
Dan Corkill
corkill at gbbopen.org
Fri Mar 30 04:44:26 EDT 2007
>> Did you specific :plus-subclasses on the :ks-triggers of MY-KS?
>>
>>
>
> No. just (define-ks my-ks :trigger-events ((my-other-event)) ...)
> The other ks defs had ((create-instance my-unit-class-x)) triggers.
Paul,
Actually, you did specify :plus-subclasses in your :trigger-events
specification (but not intentionally). When you changed your
my-other-event from a non-instance event to an instance event, you did
not add a unit-class qualifier to your define-ks :trigger-events
specification. The Agenda Shell treats this in the same way as if you
had requested an event-function to be added (using add-event-function)
and did not specify the instance-class qualifier.
For example, compare the behavior of:
(add-event-function 'fn1 'create-instance-event 'my-unit-class-x)
(describe-event-function 'fn1)
with
(add-event-function 'fn2 'create-instance-event)
(describe-event-function 'fn2)
The same behavior holds for:
:trigger-events ((create-instance-event my-unit-class-x))
versus
:trigger-events ((create-instance-event))
This is a case where GBBopen is possibly too "nice." The convention
that unspecified event qualifiers (in add/remove-event-function, in
enable/disable-event-printing, and in the Agenda Shell's
trigger/retrigger/obviate specifications) is the same as specifying
*all* can cause surprises. Note that the same things happen with
slot/link qualified events (not specifying the slot name means "all
slots") and with space-instance events (again, not specifying means "all").
Very early in its development, GBBopen (unlike GBB) required explicit
specification of the "alls" in these contexts. However, a number of
users (including my lazy self), complained that that made
add/remove-event-function and enable/disable-event-printing more tedious
to use at the REPL when working on applications. Allowing forms such as:
(remove-event-function 'evfn-printv)
to remove the evnf-printv function from all events that it had been
added to was simply too convenient not to allow it. For consistency,
then, the KS trigger/retrigger/obviation expressions were also changed
to match.
DWITIM (Do What I Think I Meant) seems to always get even in the long run...
--
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