Changeset 3057

Show
Ignore:
Timestamp:
04/13/2007 08:44:51 AM (2 years ago)
Author:
ed
Message:

Fixed some of the logic that was closing all the forms when the app exits. Some references to dialogs were still hanging around, causing dead object errors.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/ui/uiwx/uiApp.py

    r3054 r3057  
    309309            # already, so let's find those first. 
    310310            for frm in frms: 
    311                 try: 
    312                     junk = frm.Visible 
    313                 except dabo.ui.deadObjectException: 
     311                if not frm: 
    314312                    frms.remove(frm) 
    315313            # Now we can work with the rest 
     
    318316                    and frm is not self.dApp.MainForm] 
    319317            for orphan in orphans: 
    320                 orphan.close() 
     318                if orphan: 
     319                    orphan.close() 
    321320            # Now close the main form. It will close any of its children. 
    322321            mf = self.dApp.MainForm 
    323             if not mf._finito: 
     322            if mf and not mf._finito: 
    324323                mf.close() 
    325324        else: 
     
    328327                # This will allow forms to veto closing (i.e., user doesn't 
    329328                # want to save pending changes).  
    330                 try
     329                if frm
    331330                    if frm.close() == False: 
    332331                        # The form stopped the closing process. The user 
     
    335334                        frm.bringToFront() 
    336335                        return False 
    337                     else: 
    338                         frms.remove(frm) 
    339                 except: 
    340                     # Object is already deleted 
    341                     frms.remove(frm) 
     336                frms.remove(frm) 
    342337         
    343338