Changeset 4362

Show
Ignore:
Timestamp:
08/06/08 10:26:28 (4 months ago)
Author:
nate
Message:

This fixes the errors I was getting upon saving a dTreeView widget in a class. dNode objects don't have a Parent property, so we are catching an AttributeError? now instead of an IndexError?. This was introduced in 4131.

Note, there is still a display problem with the nodes upon opening the class in the class designer. Ed, are the dNode classes supposed to have ????? for the parent classID?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ide/ClassDesignerComponents.py

    r4337 r4362  
    6767                    try: 
    6868                        classID = self.Parent.classID.split("-")[0] 
    69                     except IndexError: 
     69                    except AttributeError: 
    7070                        # Try the sizer 
    7171                            try: 
    7272                                classID = self.ControllingSizer.classID.split("-")[0] 
    73                             except IndexError: 
     73                            except AttributeError: 
    7474                                classID = "?????" 
    7575                ra["classID"] = "%s-%s" % (classID, myID)