dabo Commit
Revision 5499
Date: 2009-10-27 11:15:28 -0700 (Tue, 27 Oct 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5499
Changed:
U trunk/dabo/ui/uiwx/dSpinner.py
Log:
Fixed the problem where the subclass's initProperties() setting of Value was
overriding the value passed to the instance.
We were extracting the Value key, which later on in _initProperties let the
value in the subclass prevail.
Diff:
Modified: trunk/dabo/ui/uiwx/dSpinner.py
===================================================================
--- trunk/dabo/ui/uiwx/dSpinner.py 2009-10-27 18:08:00 UTC (rev 5498)
+++ trunk/dabo/ui/uiwx/dSpinner.py 2009-10-27 18:15:28 UTC (rev 5499)
@@ -36,8 +36,6 @@
self._min = 0
self._max = 100
self._increment = 1
- val = self._extractKey((properties, attProperties, kwargs),
"Value", 0)
- val = self._numericStringVal(val)
nm = self._extractKey((properties, attProperties, kwargs),
"NameBase", "")
if not nm:
nm = self._extractKey((properties, attProperties,
kwargs), "Name", "dSpinner")
@@ -47,7 +45,7 @@
# Create the child controls
if TextBoxClass is None:
TextBoxClass = dabo.ui.dTextBox
- self._proxy_textbox = TextBoxClass(self, Value=val, Width=32,
+ self._proxy_textbox = TextBoxClass(self, Value=42, Width=32,
StrictNumericEntry=False, _EventTarget=self)
self._proxy_spinner = _dSpinButton(parent=self,
_EventTarget=self)
self.__constructed = True
@@ -60,8 +58,6 @@
# objects were created, we need to manually call
_setProperties() here.
self._properties["NameBase"] = nm
self._setNameAndProperties(self._properties, **kwargs)
-# self._setProperties(self._properties)
-# self.autoBindEvents()
ps = self._proxy_spinner
pt = self._proxy_textbox
# Set an essentially infinite range. We'll handle the range
ourselves.
@@ -77,7 +73,6 @@
pt.Bind(wx.EVT_KILL_FOCUS, self._onLostFocus)
#self.bindEvent(dEvents.KeyChar, self._onChar)
self._rerestoreValue()
-
def _rerestoreValue(self):
# Hack because when restoreValue() was originally called in
onCreate,
_______________________________________________
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]