Author: bugman Date: Mon Sep 17 16:44:01 2012 New Revision: 17484 URL: http://svn.gna.org/viewcvs/relax?rev=17484&view=rev Log: Proper bug fix for storing the execution status of wizard and user function pages. This allows the test suite to pass again. The execution status is now properly returned from the wizard pages run synchronously (and always set to True for asynchronous calls). Modified: trunk/gui/interpreter.py trunk/gui/uf_objects.py trunk/gui/wizard.py Modified: trunk/gui/interpreter.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/interpreter.py?rev=17484&r1=17483&r2=17484&view=diff ============================================================================== --- trunk/gui/interpreter.py (original) +++ trunk/gui/interpreter.py Mon Sep 17 16:44:01 2012 @@ -192,6 +192,8 @@ @type args: any arguments @param kwds: The user function keyword arguments. @type kwds: any keyword arguments + @return: Whether the user function was successfully applied or not (though as this is asynchronous, this cannot be checked so True will always be returned. + @rtype: bool """ # Debugging. @@ -203,6 +205,9 @@ # Call the thread's method. self._interpreter_thread.queue(fn, *args, **kwds) + + # Cannot judge if the user function was successful. + return True Modified: trunk/gui/uf_objects.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/uf_objects.py?rev=17484&r1=17483&r2=17484&view=diff ============================================================================== --- trunk/gui/uf_objects.py (original) +++ trunk/gui/uf_objects.py Mon Sep 17 16:44:01 2012 @@ -793,11 +793,13 @@ # Synchronous execution. if self.sync or status.gui_uf_force_sync: - interpreter.apply(uf, *args, **kwds) + return_status = interpreter.apply(uf, *args, **kwds) + return return_status # Asynchronous execution. else: interpreter.queue(uf, *args, **kwds) + return True def on_back(self): @@ -831,7 +833,7 @@ # Skip execution when a Combo_list does not have enough elements. if self.uf_data.kargs[i]['wiz_combo_list_min'] != None and kargs[name] == None: - return + return True # Handle the free file format args. if 'free_file_format' in self.uf_args: @@ -861,11 +863,14 @@ print(self._intro_text(keys, values)) # Execute the user function. - self.execute(self.name, **kargs) + return_status = self.execute(self.name, **kargs) # Bring the controller to the front. if status.show_gui and self.uf_data.display: wx.CallAfter(app.gui.controller.Raise) + + # Return the status. + return return_status def on_next(self): Modified: trunk/gui/wizard.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/wizard.py?rev=17484&r1=17483&r2=17484&view=diff ============================================================================== --- trunk/gui/wizard.py (original) +++ trunk/gui/wizard.py Mon Sep 17 16:44:01 2012 @@ -318,6 +318,8 @@ This method is called when terminating the wizard or hitting the apply button. """ + return True + def on_init(self): """To be over-ridden if an action is to be performed when a page is newly displayed. @@ -331,7 +333,6 @@ This method is called when moving to the next page of the wizard. """ -