dabo Commit
Revision 5192
Date: 2009-04-28 13:31:20 -0700 (Tue, 28 Apr 2009)
Author: Johnf
Trac: http://trac.dabodev.com/changeset/5192
Changed:
U trunk/dabo/ui/uiwx/dMaskedTextBox.py
Log:
added code to prevent the dApp.NoneDisplay (normally '<None>') from causing a
Dabo error from dMaskTextBox. Depends on the fact that the MaskedValue is
always present when dealing with get/set values.
Diff:
Modified: trunk/dabo/ui/uiwx/dMaskedTextBox.py
===================================================================
--- trunk/dabo/ui/uiwx/dMaskedTextBox.py 2009-04-22 18:58:02 UTC (rev
5191)
+++ trunk/dabo/ui/uiwx/dMaskedTextBox.py 2009-04-28 20:31:20 UTC (rev
5192)
@@ -157,17 +157,27 @@
def _getUnmaskedValue(self):
- return self.GetPlainValue()
+ ret =self.GetPlainValue()
+ if ret is None or ret=='':
+ ret = self.MaskedValue
+ return ret
def _getValue(self):
if self.ValueMode == "Masked":
ret = self.GetValue()
+
else:
ret = self.GetPlainValue()
+ #add this to cover blank or None for field values
+ if ret is None or ret=='':
+ ret= self.MaskedValue #I believe every val has
a mask??
return ret
def _setValue(self, val):
+ # added below to cover blank or None for field values
+ if val is None or val =='':
+ val=self.MaskedValue
super(dMaskedTextBox, self)._setValue(val)
_______________________________________________
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]