I found the code for the setAll and I think I know what the issue is...
for kid in kids:
ok = hasattr(kid, prop)
if ok:
if filt:
ok = eval("kid.%s" % filt)
if ok:
setattr(kid, prop, val)
if recurse:
if hasattr(kid, "setAll"):
kid.setAll(prop, val, recurse=recurse, filt=filt)
Am I correct in that the substitution will breakdown if there is a complex
filter with AND's /OR's?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, May 01, 2007 3:37 PM
To: 'Dabo Users list'
Subject: Re: [dabo-users] Filtering setAll - followup
I ran the form did a ctrl+d. I issued
self.txtSpeciesCodeID.Class==RATextBox
and it returns true.
But when I run the form using filt="Class=RATextbox ..."
It still complains that it has not been defined.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, May 01, 2007 3:23 PM
To: 'Dabo Users list'
Subject: [dabo-users] Filtering setAll
I subclassed dabo.ui.dTextBox as RAClasses.RATextBox, and added a property
named Editable.
I know about the readonly property, but need to use additional logic, hence
the custom property.
When I try to issue a setAll, python says that the class RAClasses.RATextBox
is not defined.
The form runs fine without the line so it is being defined.
self.setAll("Enabled", ok2edit ,filt="Class == RAClasses.RATextBox and
BaseClass == dabo.ui.dTextBox and Editable==False")
What am I missing?
Thanks
Larry
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.6.2/782 - Release Date: 01-May-2007
2:10 AM
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
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]