dabo Commit
Revision 5773
Date: 2010-03-30 13:49:14 -0700 (Tue, 30 Mar 2010)
Author: Nate
Trac: http://trac.dabodev.com/changeset/5773
Changed:
U trunk/dabo/ui/dDataControlMixinBase.py
Log:
Added an update call to the delayed DataSource setting. Since we are now
setting the DataSource after a form or dialog load, any calls to update will
not update the value in the control because we didn't data bind it yet. This
fixes the problem.
Diff:
Modified: trunk/dabo/ui/dDataControlMixinBase.py
===================================================================
--- trunk/dabo/ui/dDataControlMixinBase.py 2010-03-30 20:45:03 UTC (rev
5772)
+++ trunk/dabo/ui/dDataControlMixinBase.py 2010-03-30 20:49:14 UTC (rev
5773)
@@ -79,7 +79,7 @@
return
if self.flushValue() is False:
# Field validation failed
- self._fldValidFailed = True
+ self._fldValidFailed = True
return False
try:
if self.SelectOnEntry:
@@ -214,7 +214,7 @@
if self._userChanged:
self.raiseEvent(dabo.dEvents.InteractiveChange,
oldVal=oldVal)
self._userChanged = False
-
+
if not self._DesignerMode:
if (self.DataSource or
isinstance(self.DataSource, dabo.dPref)) and self.DataField:
src = self.Source
@@ -348,7 +348,7 @@
# There can be race conditions where an object's DataSource is
being set
# at the same time as other properties, such as when these are
all set at
# instantiation. There can be cases, such as list controls,
where the Choices
- # or Keys gets set after the DataSource/DataField props,
leading to the
+ # or Keys gets set after the DataSource/DataField props,
leading to the
# "Value not present" types of errors. By setting DataSource
last, through
# the callAfter, the race condition should be avoided.
def _delayedSetDataSource():
@@ -356,6 +356,7 @@
self.__src = None
self._oldVal = None
self._DataSource = val
+ self.update()
dabo.ui.callAfter(_delayedSetDataSource)
@@ -470,7 +471,7 @@
in design mode. Default=False. (bool)"""))
IsSecret = property(_getSecret, _setSecret, None,
- _("""Flag for indicating sensitive data, such as
Password field, that is not
+ _("""Flag for indicating sensitive data, such as
Password field, that is not
to be persisted. Default=False. (bool)""") )
SaveRestoreValue = property(_getSaveRestoreValue, _setSaveRestoreValue,
None,
_______________________________________________
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]