Author: bugman Date: Thu Jun 23 19:32:24 2011 New Revision: 13189 URL: http://svn.gna.org/viewcvs/relax?rev=13189&view=rev Log: Redesigned the wizard page so that on_exit() replaces execute(). Modified: branches/gui_testing/gui/wizard.py Modified: branches/gui_testing/gui/wizard.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/wizard.py?rev=13189&r1=13188&r2=13189&view=diff ============================================================================== --- branches/gui_testing/gui/wizard.py (original) +++ branches/gui_testing/gui/wizard.py Thu Jun 23 19:32:24 2011 @@ -84,7 +84,7 @@ class Wiz_page(wx.Panel): """The wizard pages to be placed inside the wizard. - To inherit from this class, you must supply the add_contents() and execute() methods. The add_contents() method should build the specific GUI elements, and the execute() method is called when clicking on the apply or ok buttons. + To inherit from this class, you must supply minimally the add_contents() and on_exit() methods. The add_contents() method should build the specific GUI elements, and the on_exit() method is called when clicking on the apply, ok, or finish buttons. All other methods which are not private can be over-written. """ # Some class variables. @@ -230,7 +230,7 @@ # Execute. try: - self.execute() + self.on_exit() except AllRelaxErrors, instance: error_message(instance.text, instance.__class__.__name__) @@ -382,13 +382,6 @@ return combo - def execute(self): - """Execute the operation (dummy method). - - If this method is not overridden, then the wizard panel will do nothing. - """ - - def file_selection(self, sizer, desc, title='File selection', default="all files (*.*)|*"): """Build the file selection element.