dabo Commit
Revision 4140
Date: 2008-06-17 05:25:14 -0700 (Tue, 17 Jun 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4140

Changed:
U   trunk/ide/ClassDesigner.py
U   trunk/ide/ClassDesignerComponents.py

Log:
Fixed a problem reported by Nate Lowrie that resulted from my last fix. This 
should take care of both cases.

Also found and corrected a problem that could cause a panel class saved with 
just an empty sizer to be re-opened as a non-sizer based component.


Diff:
Modified: trunk/ide/ClassDesigner.py
===================================================================
--- trunk/ide/ClassDesigner.py  2008-06-16 23:55:11 UTC (rev 4139)
+++ trunk/ide/ClassDesigner.py  2008-06-17 12:25:14 UTC (rev 4140)
@@ -571,8 +571,8 @@
                """
                ret = False
                atts = clsd.get("attributes", {})
-               szinf = atts.get("sizerInfo", "{}")
-               if szinf != "{}":
+               szinf = atts.get("sizerInfo", "")
+               if szinf != "":
                        ret = True
                else:
                        kids = clsd.get("children", [])

Modified: trunk/ide/ClassDesignerComponents.py
===================================================================
--- trunk/ide/ClassDesignerComponents.py        2008-06-16 23:55:11 UTC (rev 
4139)
+++ trunk/ide/ClassDesignerComponents.py        2008-06-17 12:25:14 UTC (rev 
4140)
@@ -60,7 +60,7 @@
                        if insideClass:
                                try:
                                        myID = self.classID.split("-")[1]
-                               except IndexError:
+                               except (AttributeError, IndexError):
                                        myID = abs(self.__hash__())
                                if classID is None:
                                        # First-time save. Get the classID of 
the parent




_______________________________________________
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]

Reply via email to