daboide Commit
Revision 568
Date: 2006-05-09 09:39:31 -0700 (Tue, 09 May 2006)
Author: ed
Changed:
U trunk/ClassDesigner.py
U trunk/ClassDesignerComponents.py
Log:
These fixes also address Tracker #0135. The Class Designer now works with
dPageFrameNoTabs.
Diff:
Modified: trunk/ClassDesigner.py
===================================================================
--- trunk/ClassDesigner.py 2006-05-02 21:14:01 UTC (rev 567)
+++ trunk/ClassDesigner.py 2006-05-09 16:39:31 UTC (rev 568)
@@ -584,6 +584,7 @@
isGrid = issubclass(newClass, dui.dGrid)
isPageControl = issubclass(newClass,
(dui.dPageFrame,
dui.dPageList, dui.dPageSelect,
dui.dPageFrameNoTabs))
+ noTabs = issubclass(newClass,
dui.dPageFrameNoTabs)
if isGrid:
try:
# The column entries will
create themselves, so
@@ -593,7 +594,7 @@
pass
props["ColumnCount"] = 0
elif isPageControl:
- props["PageCount"] =
atts.get("PageCount", 0)
+ props["PageCount"] =
int(atts.get("PageCount", "0"))
props["TabPosition"] =
atts.get("TabPosition", "")
try:
del atts["PageCount"]
@@ -601,6 +602,8 @@
try:
del atts["TabPosition"]
except: pass
+ if noTabs:
+ del props["TabPosition"]
# If we are pasting, we can get two objects
with the same
# Name value, so change it to NameBase.
@@ -1731,7 +1734,7 @@
if not noTabs:
props["TabPosition"] = tabPos
else:
- if not props.get("TabPosition"):
+ if not props.get("TabPosition") and not noTabs:
props["TabPosition"] = "Top"
if issubclass(cls, dui.dGrid):
@@ -1753,7 +1756,6 @@
isSavedClass = (self._extractKey(attProperties, "savedClass")
== "True")
classID = self._extractKey(attProperties, "classID")
-
attNmBase = propNmBase = ""
if attProperties is not None:
attNmBase = attProperties.get("NameBase", "")
Modified: trunk/ClassDesignerComponents.py
===================================================================
--- trunk/ClassDesignerComponents.py 2006-05-02 21:14:01 UTC (rev 567)
+++ trunk/ClassDesignerComponents.py 2006-05-09 16:39:31 UTC (rev 568)
@@ -72,15 +72,6 @@
ret["code"] = self.getCode()
else:
ret["code"] = self.getCode()
-
-
-# if insideClass:
-# try:
-# print "CLASSDICT", classDict
-# except:
-# print "MYID", myID
-# print "GETDEF",
self.Application.getDefaultValues(self)
-# print
defVals = self.Application.getDefaultValues(self)
if insideClass:
@@ -245,9 +236,15 @@
if insideClass:
childDict = clsChildren.get("children", [])
- if isinstance(self, dabo.ui.dPageFrameMixin.dPageFrameMixin):
- # PageFrame children are Pages, and are not in sizers.
- nonSizerKids = kids
+ if isinstance(self, (dabo.ui.dPageFrame, dabo.ui.dPageList,
+ dabo.ui.dPageSelect, dabo.ui.dPageFrameNoTabs)):
+ # The dPageFrameNoTabs is different, as it is not a
wx.Notebook
+ # based control
+# if isinstance(self, dabo.ui.dPageFrameNoTabs):
+# nonSizerKids = self.Pages
+# else:
+ # PageFrame children are Pages, and are not in
sizers.
+ nonSizerKids = kids
elif isinstance(self, dabo.ui.dGrid):
# Grid children are Columns
nonSizerKids = self.Columns
@@ -289,7 +286,10 @@
if hasattr(self, "_superBase"):
sz = self.mainPanel.Sizer
else:
- sz = self.Sizer
+ if isinstance(self, dabo.ui.dPageFrameNoTabs):
+ sz = None
+ else:
+ sz = self.Sizer
if sz:
szDict = None
if insideClass:
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev