Summary
------------
If you ever create menu items for Chandler, you probably should have
an attribute defined for "eventsForNamedDispatch" on your MenuItem,
or it won't be accessible from CPIA Script.
Details
--------
In our dynamic user interface, where blocks come and go, it's handy
to have a mechanism that sends an event to whichever block is
available to handle that event. For this reason CPIA has had the
ability to dispatch to events using the event's name. This is
implemented as an attribute "eventsForNamedDispatch" on Block.
Essentially, this allows the block to publish events that it, or its
children blocks, can handle. This feature has not been widely used,
until now.
CPIA Script is now leveraging off of CPIA's named event dispatch,
picking up any events that have been published. So now there's a
second reason to use "eventsForNamedDispatch" on blocks you create -
they will be visible to CPIA Script. I have already updated all the
blocks that define events, mostly Menu items and Toolbar items, to
publish their events if appropriate. In the future, when you're
creating menus, or blocks in general, consider if you want your event
to be accessible to others, and from CPIA Script. If you don't want
your menu to be scriptable, don't add the "eventsForNamedDispatch"
attribute, and that will keep your event from being directly callable.
This information will go into the CPIA Author's Guide once we get a
chance to write it.
- Donn Denman
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev