Changeset 4171

Show
Ignore:
Timestamp:
06/20/08 09:49:43 (2 months ago)
Author:
ed
Message:

Added the 'afterFinish()' hook method. This fires after the app has terminated, allowing you to do cleanup stuff in the app instead of in the calling program.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/dApp.py

    r4117 r4171  
    334334     
    335335    def finish(self): 
    336         """Called when the application event loop has ended. 
    337  
    338         You may also call this explicitly to exit the application event loop. 
     336        """Called when the application event loop has ended. You may also  
     337        call this explicitly to exit the application event loop. 
    339338        """ 
    340339        self.uiApp.exit() 
     
    345344        dabo.infoLog.write(_("Application finished.")) 
    346345        self._finished = True 
     346        self.afterFinish() 
     347 
     348 
     349    def afterFinish(self): 
     350        """Stub method. When this is called, the app has already terminated, and you have  
     351        one last chance to execute code by overriding this method. 
     352        """ 
     353        pass 
    347354 
    348355