Ed Leafe wrote:
> On May 1, 2007, at 3:23 PM, <[EMAIL PROTECTED]>  
> <[EMAIL PROTECTED]> wrote:
> 
>> self.setAll("Enabled", ok2edit ,filt="Class == RAClasses.RATextBox and
>> BaseClass == dabo.ui.dTextBox and Editable==False")
> 
>       The code for setAll() reads:
> 
> for kid in kids:
>       ok = hasattr(kid, prop)
>       if ok:
>               if filt:
>                       ok = eval("kid.%s" % filt)
> 
>       So we're evaluating the passed filter expression as if it were a  
> single property. Your expression would result in:
> 
> kid.Class == RAClasses.RATextBox and BaseClass == dabo.ui.dTextBox  
> and Editable==False
> 
>       Clearly, that's not going to work.
> 
>       Perhaps this could be changed to allow passing a tuple, with each  
> element being compared in the manner that the current code works. So  
> instead of what you wrote, it would look like:
> 
> self.setAll("Enabled", ok2edit ,filt=("Class is RAClasses.RATextBox",  
> "BaseClass is dabo.ui.dTextBox", "Editable isFalse"))
> 
>       Does that look like something that would work for you?

I like that better than my %(o)s thing.

Editable isFalse  ?

Carl K


_______________________________________________
Post Messages to: [email protected]
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/dabo-users/[EMAIL PROTECTED]

Reply via email to