Re: InstanceEvent on all types
Martin Matula <[email protected]> Wed, 11 Feb 2004 01:50:14 +0100
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Wim, this is currently not possible. I guess the simplest solution (in terms of maintainability) would be to implement such a support directly in the MDR. Could you propose what should the peferable API for that look like. I was also thinking about adding support for propagating events accross the containment hierarchy (from an instance to its containers transitively), which would be a similar kind of thing. But then we are getting into to much propagation of events which is usually not even necessary. So I guess one would like to control (when registering a listener) whether they want to listen also to components/instances of subtypes or not. Other (procedurally simplier) option for you to consider is to write your own listeners registration utility that registers the listener on the class proxies corresponding to a given metaclass and all of its subtypes. If you want a quick solution, maybe you should go for the second option, in the meantime we can work together on the new API and implement the first option and then you can switch to that. Martin Bast, Wim wrote: > Dear MDR developer, > > I would like to subscribe (and unsubscribe) to InstanceEvents on all classes > that specialize some, or are equal to a specific class. This is analogue to > use refAllOfType() instead of refAllOfClass(). > As I understand it, MDR only raises an InstanceEvent (create or delete) on > the exact class proxy by which the RefObject is created or deleted (only on > one proxy). > Is this assumption correct and is there a simple solution to my problem? > thanks, > Wim > > >