[PEAK] What do you use 'offerAs' for?

Jason sphexy at gmail.com
Thu Sep 29 20:58:25 EDT 2005


I think Dave P sent a mail about one of our uses of offerAs but since I
don't see it I'll send another. Our application has an event system in which
the top level app offers an event handling class and other components
(plugins, widgets, etc) can either Obtain it or make their own and offer it
to their children.

This event class it pretty simple, it is where components register signals
and other observables and it is where other components subscribe to them.
Creating a new event class basically creates a new event namespace for a
component and its children. (The event class also knows how to propagate
events up or down the hierarchy as needed.)

I'm not sure how dynamic variables could be used in this case. An instance
of our event class is used across multiple methods in a component and I'm
unsure how it would be implicitly offered as you described above.

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eby-sarna.com/pipermail/peak/attachments/20050929/e5ac688d/attachment.html


More information about the PEAK mailing list