dabo Commit
Revision 1536
Date: 2005-11-10 11:21:16 -0800 (Thu, 10 Nov 2005)
Author: paul
Changed:
U trunk/dabo/ui/uiwx/dSpinner.py
Log:
There were problems with dSpinner raising Hit after EVT_TEXT. This is not
necessary as EVT_SPINNER is raised appropriately (after enter pressed or
after spinner arrow pushed) so I'm not sure why I put it in there originally.
Also, moved the flushValue() to happen before calling the _onWxHit() to
mirror what happens in dCheckBox: no need to catch the dabo event.
This fixed a couple oddities with the spinner in the new demo BTW.
Diff:
Modified: trunk/dabo/ui/uiwx/dSpinner.py
===================================================================
--- trunk/dabo/ui/uiwx/dSpinner.py 2005-11-10 18:08:11 UTC (rev 1535)
+++ trunk/dabo/ui/uiwx/dSpinner.py 2005-11-10 19:21:16 UTC (rev 1536)
@@ -19,8 +19,6 @@
def _initEvents(self):
super(dSpinner, self)._initEvents()
self.Bind(wx.EVT_SPINCTRL, self._onWxHit)
- self.Bind(wx.EVT_TEXT, self._onWxText)
- self.bindEvent(dEvents.Hit, self._onSpinnerHit)
def _preInitUI(self, kwargs):
@@ -35,18 +33,12 @@
return tuple(original + additional)
- def _onWxText(self, evt):
- if evt.IsChecked():
- # If the user enters invalid text in the text field,
IsChecked()
- # will return False, so we know to ignore the input.
- self.raiseEvent(dabo.dEvents.Hit, evt)
-
-
- def _onSpinnerHit(self, evt):
+ def _onWxHit(self, evt):
# Flush the data on each hit, not just when focus is lost.
self.flushValue()
+ super(dSpinner, self)._onWxHit(evt)
+
-
# Property get/set/del methods follow. Scroll to bottom to see the
property
# definitions themselves.
def _getMax(self):
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev