dabo Commit
Revision 2476
Date: 2006-11-18 00:43:33 -0800 (Sat, 18 Nov 2006)
Author: paul

Changed:
U   branches/wx2.7/dabo/ui/dDataControlMixinBase.py
U   branches/wx2.7/dabo/ui/uiwx/dPemMixin.py

Log:
Another fix for 2.7: the ID bug in togglebutton was fixed in wx, so now
we need to test the wx version before mangling kwargs.


Diff:
Modified: branches/wx2.7/dabo/ui/dDataControlMixinBase.py
===================================================================
--- branches/wx2.7/dabo/ui/dDataControlMixinBase.py     2006-11-18 08:03:53 UTC 
(rev 2475)
+++ branches/wx2.7/dabo/ui/dDataControlMixinBase.py     2006-11-18 08:43:33 UTC 
(rev 2476)
@@ -16,7 +16,7 @@
                self._designerMode = None
                self._oldVal = None
 
-               super(dDataControlMixinBase, self).__init__(*args, **kwargs)
+               dabo.ui.dControlMixin.__init__(self, *args, **kwargs)
                        
                self._value = self.Value
                self._enabled = True

Modified: branches/wx2.7/dabo/ui/uiwx/dPemMixin.py
===================================================================
--- branches/wx2.7/dabo/ui/uiwx/dPemMixin.py    2006-11-18 08:03:53 UTC (rev 
2475)
+++ branches/wx2.7/dabo/ui/uiwx/dPemMixin.py    2006-11-18 08:43:33 UTC (rev 
2476)
@@ -131,8 +131,13 @@
                        # This is needed because these classes require a 
'parent' param.
                        kwargs["parent"] = parent
                elif issubclass(self._baseClass, dabo.ui.dToggleButton):
-                       self._preInitProperties["ID"] = 
self._preInitProperties["id"]
-                       del self._preInitProperties["id"]
+                       version = wx.VERSION
+                       major = version[0]
+                       minor = version[1]
+                       if major == 2 and minor < 7:
+                               # versions prior to 2.7 had the id parameter as 
ID, unfortunately.
+                               self._preInitProperties["ID"] = 
self._preInitProperties["id"]
+                               del self._preInitProperties["id"]
                # This is needed when running from a saved design file
                self._extractKey(properties, "designerClass")
                # This attribute is used when saving code with a design file




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to