dabo Commit
Revision 5900
Date: 2010-07-05 10:27:21 -0700 (Mon, 05 Jul 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5900
Changed:
U trunk/dabo/lib/DesignerClassConverter.py
Log:
Fixed a problem when adding custom classes to a design. Also fixed a typo where
I missed name change in the recent renaming of this class.
Diff:
Modified: trunk/dabo/lib/DesignerClassConverter.py
===================================================================
--- trunk/dabo/lib/DesignerClassConverter.py 2010-06-19 00:36:04 UTC (rev
5899)
+++ trunk/dabo/lib/DesignerClassConverter.py 2010-07-05 17:27:21 UTC (rev
5900)
@@ -336,7 +336,7 @@
else:
template = self.containerClassTemplate
stackinit = self._stackInitText
- self.classText += template % locals()
+ self.classText += template % locals()
self.classText += stackinit
if isWiz:
@@ -478,7 +478,14 @@
# This will get set to True if we process a splitter
control
isSplitter = False
splitterString = ""
- if "classID" in atts:
+ try:
+ # Classes will have a single numeric classID
(e.g.: 123456789).
+ # Components inside those classes will have the
outer ID hypenated
+ # with their own ID (e.g.: 123456789-987654321).
+ isInherited = (len(atts["classID"].split("-"))
== 1)
+ except KeyError:
+ isInherited = False
+ if isInherited:
if not os.path.exists(clsname):
clsname =
dabo.lib.utils.locateRelativeTo(self._srcFile, clsname)
chldList = [[child]] + specChildList[:]
@@ -777,7 +784,7 @@
for this class.
"""
conv = DesignerClassConverter()
- xmlDict = conv.importSrc(pth)
+ xmlDict = conv.importXmlSrc(pth)
conv.createClassText(xmlDict, addImports=False,
specList=specList)
self.innerClassText += conv.classText + (2 * LINESEP)
self.innerClassNames.append(conv.mainClassName)
_______________________________________________
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]