>> I would think it can be used for other properties too, then the specific >> set() callback needs to separate each value by itself. One advantage of >> using the current approach (val_cnt > 1) is that we can make the most >> use of the general logic. For example, compare each value to the list of >> possible values to validate the value etc., which is not needed to the >> "autopush" property. > > > Do you mean that you'll add the general logic? I don't > think it is there right now to do the above. For example, > the value checking is done by specific function associated > with a property. I don't know what future property will > be like, but it may be of many different types such that > having a general comparison logic will be difficult. > 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. Thanks - Cathy
