Changeset 3748
- Timestamp:
- 11/24/07 07:33:33 (1 year ago)
- Files:
-
- trunk/ide/ClassDesigner.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ide/ClassDesigner.py
r3670 r3748 378 378 self._classMethods[cls] = mthdsForClass(cls) 379 379 380 381 def getFormClass(self): 380 def getFormClass(self, filepath=None): 382 381 """If the selected class is a form/dialog, return a mixed-in 383 382 subclass of it. Otherwise, return the base ClassDesignerForm. … … 399 398 _superBase = base 400 399 _superMixin = dfm 400 _classFile = filepath 401 401 def __init__(self, parent=None, *args, **kwargs): 402 402 self._isMain = formIsMain … … 528 528 """ 529 529 try: 530 if not os.path.exists(pth): 531 if os.path.exists(os.path.abspath(pth)): 532 pth = os.path.abspath(pth) 530 533 dct = xtd.xmltodict(pth, addCodeFile=True) 531 except: 532 raise IOError, _("This does not appear to be a valid class file.") 534 except StandardError, e: 535 if pth.strip().startswith("<?xml") or os.path.exists(pth): 536 raise IOError, _("This does not appear to be a valid class file.") 537 else: 538 raise IOError, _("The class file '%s' was not found.") % pth 539 533 540 534 541 # Traverse the dct, looking for superclass information … … 630 637 # For now, just create a standard dForm mixed-in ClassDesigner 631 638 # form as the base. 632 frmClass = self.getFormClass( )639 frmClass = self.getFormClass(filepath=pth) 633 640 if isWiz: 634 641 self._extractKey(atts, "PageCount")
