Author: justi9
Date: 2008-10-04 15:25:00 -0400 (Sat, 04 Oct 2008)
New Revision: 2593
Modified:
mgmt/trunk/cumin/python/cumin/binding.py
mgmt/trunk/cumin/python/wooly/__init__.py
mgmt/trunk/cumin/python/wooly/forms.py
Log:
Don't reverse Widget.ancestors; it's now ordered child to parent
Modified: mgmt/trunk/cumin/python/cumin/binding.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.py 2008-10-03 18:52:27 UTC (rev 2592)
+++ mgmt/trunk/cumin/python/cumin/binding.py 2008-10-04 19:25:00 UTC (rev 2593)
@@ -24,7 +24,7 @@
def init(self):
super(ExchangeInput, self).init()
- for anc in reversed(self.ancestors):
+ for anc in self.ancestors:
if isinstance(anc, Form):
self.form = anc
Modified: mgmt/trunk/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/__init__.py 2008-10-03 18:52:27 UTC (rev 2592)
+++ mgmt/trunk/cumin/python/wooly/__init__.py 2008-10-04 19:25:00 UTC (rev 2593)
@@ -127,14 +127,14 @@
self.frame = widget
break
- self.ancestors = tuple(reversed(ancestors))
-
- pelems = [x.name for x in self.ancestors]
+ self.ancestors = tuple(ancestors)
+
+ pelems = [x.name for x in reversed(ancestors)]
pelems.append(self.name)
self.path = ".".join(pelems[1:])
- assert isinstance(self.ancestors[0], Page)
- self.page = self.ancestors[0]
+ assert isinstance(self.ancestors[-1], Page)
+ self.page = self.ancestors[-1]
self.sealed = True
@@ -170,7 +170,7 @@
parameter.widget = self
def get_ancestor(self, name):
- for anc in reversed(self.ancestors):
+ for anc in self.ancestors:
if anc.name == name:
return anc
Modified: mgmt/trunk/cumin/python/wooly/forms.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/forms.py 2008-10-03 18:52:27 UTC (rev 2592)
+++ mgmt/trunk/cumin/python/wooly/forms.py 2008-10-04 19:25:00 UTC (rev 2593)
@@ -115,7 +115,7 @@
assert self.param is not None
assert isinstance(self.param, Parameter)
- for anc in reversed(self.ancestors):
+ for anc in self.ancestors:
if isinstance(anc, Form):
self.form = anc
Show replies by date