Changeset 4492

Show
Ignore:
Timestamp:
09/01/08 09:12:16 (3 months ago)
Author:
ed
Message:

Modified the startup so that if you pass the name of file you want to create that does not yet exist, it asks you if you want to create it instead of just ignoring it.

Files:

Legend:

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

    r4476 r4492  
    174174                clsOK = True 
    175175            except IOError, e: 
    176                 dui.stop(str(e)) 
     176                msg = _("'%s' does not exist. Create it?") % clsFile 
     177                if dui.areYouSure(message=msg, title=_("File Not Found"), cancelButton=False): 
     178                    frm = self.onNewDesign(evt=None, pth=clsFile) 
     179                    clsOK = True 
    177180 
    178181        if not clsOK: 
     
    17691772 
    17701773 
    1771     def onNewDesign(self, evt): 
     1774    def onNewDesign(self, evt, pth=None): 
    17721775        pcs = self.pagedControls 
    17731776        class NewClassPicker(dabo.ui.dOkCancelDialog): 
     
    18461849            obj = self.addNewControl(frm.initLayoutPanel, newClass) 
    18471850            frm.Caption = _("Dabo Class Designer: %s") % obj.Name 
     1851        if pth: 
     1852            frm._classFile = pth 
    18481853        frm.Visible = True 
    18491854        dui.callAfter(frm.bringToFront) 
    18501855        dui.callAfter(frm.saveState) 
     1856        return frm 
    18511857 
    18521858