Ed Leafe wrote:
> On Dec 2, 2008, at 9:52 PM, Paul McNett wrote:
> 
>> The defaults will be the default from the single superclass. You  
>> don't have to ask
>> layers of superclasses. Instantiate your subclass, and then find out  
>> what the
>> property value is. That is the default.
> 
>       Ah, there's the rub. Instantiating an object can have all sorts of  
> wonky side effects.
> 
>       It's kinda gratifying to see you following the exact same thought  
> patterns that I went through when I worked on this stuff. We still  
> instantiate all the base Dabo controls in the Class Designer to get  
> the defaults; this was problematic enough, but manageable. When I  
> started instantiating custom classes, which could have all sorts of  
> code that executed at instantiation, things got a lot messier. So I  
> started exploring creating a property graph for each class, but of  
> course each level of inheritance required knowing a lot about all of  
> its superclasses, and I quickly came to the conclusion that this was  
> unwieldy with anything over one level of inheritance. Hence the design  
> decision that I came to and we are currently discussing.

It just seems like superclass/subclass/instance with cdxml should mirror as 
close as 
possible superclass/subclass/instance in Python.

We are talking about 2 things here:

1) default property value for the instance, which can be gotten by 
instantiating it 
without setting any properties. Wonky side effects notwithstanding. :) We only 
need 
to instantiate to the point of __init__() being complete to get the default 
prop 
values, after all. IOW, no additional code, and no event loop.

2) whether or not the appdev has overridden the default value for a property. 
This 
doesn't even need to know what the default is, just that the appdev has made an 
explicit choice in the property grid. Only when an explicit choice is made 
should we 
save the property value to the cdxml. Conversely, if a property value exists in 
the 
cdxml, therefore the appdev has overridden the default. So we can then present 
a 
"reset to default" choice that removes that property value from the cdxml.

Of course I'm just spouting without having an implementation, and I'm sure 
there are 
(surmountable) problems with my ideas. ;)

Paul


_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to