dabo Commit
Revision 4171
Date: 2008-06-20 09:49:43 -0700 (Fri, 20 Jun 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4171

Changed:
U   trunk/dabo/dApp.py

Log:
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.


Diff:
Modified: trunk/dabo/dApp.py
===================================================================
--- trunk/dabo/dApp.py  2008-06-20 16:42:56 UTC (rev 4170)
+++ trunk/dabo/dApp.py  2008-06-20 16:49:43 UTC (rev 4171)
@@ -333,9 +333,8 @@
        
        
        def finish(self):
-               """Called when the application event loop has ended.
-
-               You may also call this explicitly to exit the application event 
loop.
+               """Called when the application event loop has ended. You may 
also 
+               call this explicitly to exit the application event loop.
                """
                self.uiApp.exit()
                self._persistMRU()
@@ -344,8 +343,16 @@
                self._tempFileHolder.release()
                dabo.infoLog.write(_("Application finished."))
                self._finished = True
+               self.afterFinish()
 
 
+       def afterFinish(self):
+               """Stub method. When this is called, the app has already 
terminated, and you have 
+               one last chance to execute code by overriding this method.
+               """
+               pass
+
+
        def _setProjInfo(self):
                """Create a 2-tuple containing the project location and project 
name, if any. 
                The location is always the directory containing the initial 
startup program; the




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to