Re: [Figleaf-developer] Current code changes
Status: Alpha
Brought to you by:
steckman
|
From: Greg S. <ste...@on...> - 2004-07-02 16:02:19
|
I think having the capability to modify behavior on a class-by-class basis is a good thing. There could be a good reason for someone to alter their implementation of Observable for a particular class. Since we can't foresee all possible usage scenarios, I wouldn't want to take that capability away from the developer. Of course with power comes responsibility: if they do it, they need to understand the consequences of how that object will behave in the application stack. I intentionally left the interface Informative without any methods of its own. It's basically a tag interface for knowing an object implements all three of Observable, ClassDescriptor, and Validatable (and perhaps we will add more later). My thought was if a class (or its helper) implements ClassDescriptor and Validatable, then the Introspector would detect that and provide a default implementation of Observable for it, thereby creating a proxy that implemented Informative. So the class (or its helper, metadata, etc) could provide implementations for none, some, or all of the sub-interfaces of Informative, and the Introspector/ProxyFactory would do the right thing to make a proxy instance that implements Informative completely. Greg sam...@ma... wrote: >Do we really want that? My code does that for the developer - the UI will depend >on these events being properly fired in order to maintain system integrity, as >such I think its something that should be under our control. > >Quoting Greg Steckman <ste...@on...>: > > > >>Note that Informative extends Observable. So if you implement >>Informative, then it means you must also implement Observable. >> >>Also, not all methods will be called via Property objects. Consider >>those objects invoking methods directly on the object (that is, those >>that know nothing about the Informative interface). >> >>Greg >> >> > > > >sam >http://www.magpiebrain.com/ > > > |