Author: bugman Date: Mon May 28 12:05:50 2012 New Revision: 16472 URL: http://svn.gna.org/viewcvs/relax?rev=16472&view=rev Log: The GUI auto-generated user function SetValue() method now skips function and fn arg arguments. These are not supported in the GUI! Modified: branches/uf_redesign/gui/uf_objects.py Modified: branches/uf_redesign/gui/uf_objects.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/uf_objects.py?rev=16472&r1=16471&r2=16472&view=diff ============================================================================== --- branches/uf_redesign/gui/uf_objects.py (original) +++ branches/uf_redesign/gui/uf_objects.py Mon May 28 12:05:50 2012 @@ -405,9 +405,23 @@ @type value: unknown """ + # Find the argument. + arg = None + for i in range(len(self.uf_data.kargs)): + if self.uf_data.kargs[i]['name'] == key: + arg = self.uf_data.kargs[i] + + # No match. + if arg == None: + raise RelaxError("The key '%s' is unknown." % key) + # Handle the free file format args (for external control, i.e. via the test suite). if 'free_file_format' in self.uf_args and key in ['spin_id_col', 'mol_name_col', 'res_num_col', 'res_name_col', 'spin_num_col', 'spin_name_col', 'data_col', 'error_col', 'sep']: self.uf_args['free_file_format'].SetValue(key, value) + + # Skip functions and function args, as these are not supported in the GUI. + elif arg['arg_type'] in ['func', 'func args']: + pass # Call the argument element's method. else: