[Dev] Menu items support named dispatch
Brendan O'Connor
brendano at osafoundation.org
Tue Aug 2 13:31:31 PDT 2005
I didn't know about eventsForNamedDispatch, I'll look into it -- it
sounds more like what we need.
Brendan
On Tue, 02 Aug 2005 13:27:53 -0700, John Anderson <john at osafoundation.org>
wrote:
> BroadcastEverywhere should be rarely used, and eventually we may
> eliminate it. Typically you should use BroadcastInsideMyEventBoundary,
> which broadcasts to all the blocks inside an event boundary, containing
> the block that sent the event, or
> BroadcastInsideActiveViewEventBoundary, which broadcasts to all the
> blocks inside an event boundary containing the active view.
> BroadcastEverywhere broadcasts to all the blocks that are rendered,
> which is slow (especially during UpdateUIEvents) and doesn't allow
> different parcels to have a different namespace for events.
>
> Let me know if none of the dispatch mechanisms, except
> BroadcastEverywhere, are convenient for you and I'll try to come up with
> an alternate dispatch mechanism.
>
> John
>
> Brendan O'Connor wrote:
>
>>> 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.
>>
>>
>> Donn, is this in general preferable to using BroadcastEverywhere?
>> More and more BroadcastEverywhere events are being sent around in the
>> block-ified main calendar, but they do so because of the reason you're
>> advocating eventsForNamedDispatch, namely that you can assign an
>> arbitrary number of listeners and the sender doesn't have to worry
>> about who' listening ... some notes on
>> http://bugzilla.osafoundation.org/show_bug.cgi?id=3607
>>
>> Brendan
>> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>>
>> Open Source Applications Foundation "Dev" mailing list
>> http://lists.osafoundation.org/mailman/listinfo/dev
>
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
More information about the Dev
mailing list