dabo Commit
Revision 4516
Date: 2008-09-09 10:02:14 -0700 (Tue, 09 Sep 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4516
Changed:
U trunk/dabo/ui/dPemMixinBase.py
U trunk/dabo/ui/uiwx/dPemMixin.py
U trunk/dabo/ui/uiwx/dSpinner.py
Log:
Reverted problematic areas of commit [4510].
Diff:
Modified: trunk/dabo/ui/dPemMixinBase.py
===================================================================
--- trunk/dabo/ui/dPemMixinBase.py 2008-09-09 16:09:02 UTC (rev 4515)
+++ trunk/dabo/ui/dPemMixinBase.py 2008-09-09 17:02:14 UTC (rev 4516)
@@ -61,28 +61,22 @@
pass
- def _processName(self, properties, kwargs, defaultName):
+ def _processName(self, kwargs, defaultName):
# Called by the constructors of the dObjects, to properly set
the
# name of the object based on whether the user set it explicitly
# or Dabo is to provide it implicitly.
- propdict = {}
- propdict.update(kwargs)
- propdict.update(properties)
-
- _explicitName = propdict.get("_explicitName", False)
+ _explicitName = kwargs.get("_explicitName", False)
- if "Name" in propdict.keys():
- if "_explicitName" not in propdict.keys():
+ if "Name" in kwargs.keys():
+ if "_explicitName" not in kwargs.keys():
# Name was sent; _explicitName wasn't.
_explicitName = True
- name = propdict["Name"]
+ name = kwargs["Name"]
else:
name = defaultName
if kwargs.has_key("_explicitName"):
del(kwargs["_explicitName"])
- if properties.has_key("_explicitName"):
- del(properties["_explicitName"])
return name, _explicitName
Modified: trunk/dabo/ui/uiwx/dPemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPemMixin.py 2008-09-09 16:09:02 UTC (rev 4515)
+++ trunk/dabo/ui/uiwx/dPemMixin.py 2008-09-09 17:02:14 UTC (rev 4516)
@@ -208,7 +208,7 @@
the given Name isn't unique among siblings.
"""
if not dabo.fastNameSet:
- name, _explicitName = self._processName(properties,
kwargs, self.__class__.__name__)
+ name, _explicitName = self._processName(kwargs,
self.__class__.__name__)
self._initName(name, _explicitName=_explicitName)
# Add any properties that were re-set
Modified: trunk/dabo/ui/uiwx/dSpinner.py
===================================================================
--- trunk/dabo/ui/uiwx/dSpinner.py 2008-09-09 16:09:02 UTC (rev 4515)
+++ trunk/dabo/ui/uiwx/dSpinner.py 2008-09-09 17:02:14 UTC (rev 4516)
@@ -48,6 +48,9 @@
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")
super(dSpinner, self).__init__(parent=parent,
properties=properties,
attProperties=attProperties, *args, **kwargs)
self._baseClass = dSpinner
@@ -63,6 +66,7 @@
self.fitToSizer()
# Because several properties could not be set until after the
child
# objects were created, we need to manually call
_setProperties() here.
+ self._properties["NameBase"] = nm
self._setProperties(self._properties)
self.autoBindEvents()
ps = self._proxy_spinner
@@ -78,6 +82,7 @@
self.bindEvent(dEvents.KeyChar, self._onChar)
self.bindEvent(dEvents.LostFocus, self._onLostFocus)
self._rerestoreValue()
+
def _rerestoreValue(self):
# Hack because when restoreValue() was originally called in
onCreate,
@@ -85,6 +90,7 @@
if self.SaveRestoreValue:
self.restoreValue()
+
def _constructed(self):
"""Returns True if the ui object has been fully created yet,
False otherwise."""
return self.__constructed
_______________________________________________
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]