From: Kevin A. <ka...@us...> - 2005-12-30 06:29:46
|
Update of /cvsroot/pythoncard/PythonCard/docs/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24516 Modified Files: walkthrough3.html Log Message: changed on_menuFileExit_select to on_exit_command and added explanation hopefully this makes the walkthrough work again and is understandable Index: walkthrough3.html =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/html/walkthrough3.html,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** walkthrough3.html 26 Dec 2005 08:53:46 -0000 1.10 --- walkthrough3.html 30 Dec 2005 06:29:36 -0000 1.11 *************** *** 227,235 **** self.visible = False ! def on_menuFileExit_select(self, event): self.close() </pre> ! <p>As the above code shows, the File->Exit menu item just calls the ! close() to close the window. That is the same as clicking the close box on the window and triggers the close window event, so that on_close is called. We placed the work to be done when the document is closing in the --- 227,237 ---- self.visible = False ! def on_exit_command(self, event): self.close() </pre> ! <p>The resource file (minimal.rsrc.py) defines an exit command for the File->Exit menu ! so we use a command handler to override the default behavior. ! As the above code shows, the File->Exit menu item just calls the ! close() method to close the window. That is the same as clicking the close box on the window and triggers the close window event, so that on_close is called. We placed the work to be done when the document is closing in the |