dabo Commit
Revision 1402
Date: 2005-10-04 16:26:35 -0700 (Tue, 04 Oct 2005)
Author: paul
Changed:
U trunk/dabo/common/eventMixin.py
U trunk/dabo/common/propertyHelperMixin.py
U trunk/dabo/ui/dPemMixinBase.py
U trunk/dabo/ui/uiwx/dPemMixin.py
U trunk/dabo/ui/uiwx/dRadioGroup.py
Log:
Removed some old cruft from getPropertyInfo() that we no longer use.
Diff:
Modified: trunk/dabo/common/eventMixin.py
===================================================================
--- trunk/dabo/common/eventMixin.py 2005-10-04 21:27:00 UTC (rev 1401)
+++ trunk/dabo/common/eventMixin.py 2005-10-04 23:26:35 UTC (rev 1402)
@@ -151,13 +151,6 @@
object to respond to an event, you'll still have to manually
set up that
event binding.
- FEATURE NOT AUTOMATIC YET: to try out this feature, you need to
enable
- it explicitly:
- dabo.autoBindEvents = True ## (global)
- --or--
- def initEvents(self):
- self.autoBindEvents() ## (local to the class)
-
This feature is inspired by PythonCard.
"""
# We call _autoBindEvents for self and form, and force it
because it was
Modified: trunk/dabo/common/propertyHelperMixin.py
===================================================================
--- trunk/dabo/common/propertyHelperMixin.py 2005-10-04 21:27:00 UTC (rev
1401)
+++ trunk/dabo/common/propertyHelperMixin.py 2005-10-04 23:26:35 UTC (rev
1402)
@@ -239,6 +239,7 @@
classRef = cls.__class__
propRef = getattr(classRef, name)
+
if type(propRef) == property:
if propRef.fget is None:
# With no getter, the property's value cannot
be determined
Modified: trunk/dabo/ui/dPemMixinBase.py
===================================================================
--- trunk/dabo/ui/dPemMixinBase.py 2005-10-04 21:27:00 UTC (rev 1401)
+++ trunk/dabo/ui/dPemMixinBase.py 2005-10-04 23:26:35 UTC (rev 1402)
@@ -14,11 +14,11 @@
"""
pass
- def getPropertyInfo(self, name):
+ def getPropertyInfo(cls, name):
""" Abstract method: subclasses MUST override for UI-specifics.
"""
- return super(dPemMixinBase, self).getPropertyInfo(name)
-
+ return super(dPemMixinBase, cls).getPropertyInfo(name)
+ getPropertyInfo = classmethod(getPropertyInfo)
def addObject(self, classRef, name=None, *args, **kwargs):
""" Create an instance of classRef, and make it a child of self.
Modified: trunk/dabo/ui/uiwx/dPemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPemMixin.py 2005-10-04 21:27:00 UTC (rev 1401)
+++ trunk/dabo/ui/uiwx/dPemMixin.py 2005-10-04 23:26:35 UTC (rev 1402)
@@ -434,22 +434,10 @@
self.SetAcceleratorTable(wx.AcceleratorTable(table.values()))
- def getPropertyInfo(self, name):
- d = super(dPemMixin, self).getPropertyInfo(name)
+ def getPropertyInfo(cls, name):
+ return super(dPemMixin, cls).getPropertyInfo(name)
+ getPropertyInfo = classmethod(getPropertyInfo)
- # List of all props we ever want to show in the Designer
- d["showInDesigner"] = name in dabo.ui.propsToShowInDesigner
-
- # Some wx-specific props need to be initialized early. Let the
designer know:
- d["preInitProperty"] = name in self._preInitProperties.values()
-
- # Finally, override the default editable state. The base
behavior
- # is to make any prop with a setter method editable, but some
simply
- # should not be edited in the Designer.
- d["editValueInDesigner"] = name in dabo.ui.propsToEditInDesigner
-
- return d
-
def lockDisplay(self):
"""Locks the visual updates to the control to improve
performance
Modified: trunk/dabo/ui/uiwx/dRadioGroup.py
===================================================================
--- trunk/dabo/ui/uiwx/dRadioGroup.py 2005-10-04 21:27:00 UTC (rev 1401)
+++ trunk/dabo/ui/uiwx/dRadioGroup.py 2005-10-04 23:26:35 UTC (rev 1402)
@@ -107,14 +107,7 @@
self.flushValue()
dRadioGroup.doDefault(evt)
-
- def getPropertyInfo(self, name):
- d = super(dRadioGroup, self).getPropertyinfo(name)
- if not d['preInitProperty']:
- d['preInitProperty'] = name in ('MaxElements',
'Orientation', 'Choices')
- return d
-
# Property get/set/del methods follow. Scroll to bottom to see the
property
# definitions themselves.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev