Cathy Zhou wrote:

> Right. I will make the following logic to be general :
> 
> a) compare the value with the possible list of values (if there is such
> list)
> b) get the default value (if there is the list)
> c) fail if setting a read-only property.
> d) get the list of possible values.
> 
> Maybe more... and this is the reason I started the whole discussion.
> 
> I would think no matter how the type of properties would be, these
> should be generic.


I agree that the compare, get, ... semantics are generic,
but the actual comparison, checking, ... is type specific.
So if you want to make the logic general, I guess you need
to provide the mechanism for adding new types, without the
need to change the generic code.


-- 

                                                K. Poon.
                                                kacheong.poon at sun.com


Reply via email to