dabo Commit
Revision 5077
Date: 2009-02-25 14:25:16 -0800 (Wed, 25 Feb 2009)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5077

Changed:
U   trunk/dabo/dPref.py

Log:
Fixed an issue where a control bound to a non-existent preference would throw 
an error (Trac issue #1207).


Diff:
Modified: trunk/dabo/dPref.py
===================================================================
--- trunk/dabo/dPref.py 2009-02-24 21:28:18 UTC (rev 5076)
+++ trunk/dabo/dPref.py 2009-02-25 22:25:16 UTC (rev 5077)
@@ -469,8 +469,15 @@
                        return ret
                
                return mkTree(vs)
-               
-       
+
+
+       def __nonzero__(self):
+               """Preference instances should always evaluate to a boolean 
False, 
+               as they represent a lack of a value; i.e., a dot-separated 
path, but
+               not an actual stored value."""
+               return False
+
+
        # Property definitions start here
        def _getAutoPersist(self):
                ret = self._autoPersist



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to