Author: bugman Date: Fri May 11 18:57:13 2012 New Revision: 16243 URL: http://svn.gna.org/viewcvs/relax?rev=16243&view=rev Log: Fix for the Uf_container.add_keyarg() method for the wiz_combo_choices argument. The argument defaulted to [] which is the problem! Then for every single user function argument which does not provide a value for wiz_combo_choices will all be aliased to the same object! The GUI code was then pre-pending the empty string to this list if can_be_none is set for the Value object, modifying the list for all other user functions. Modified: branches/uf_redesign/user_functions/objects.py Modified: branches/uf_redesign/user_functions/objects.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/user_functions/objects.py?rev=16243&r1=16242&r2=16243&view=diff ============================================================================== --- branches/uf_redesign/user_functions/objects.py (original) +++ branches/uf_redesign/user_functions/objects.py Fri May 11 18:57:13 2012 @@ -185,7 +185,7 @@ self.__dict__[name] = value - def add_keyarg(self, name=None, default=None, py_type=None, arg_type=None, dim=None, min=0, max=1000, desc_short=None, desc=None, list_titles=None, wiz_element_type='default', wiz_combo_choices=[], wiz_combo_data=None, wiz_combo_iter=None, wiz_combo_list_size=None, wiz_read_only=None, can_be_none=False, can_be_empty=False, none_elements=False): + def add_keyarg(self, name=None, default=None, py_type=None, arg_type=None, dim=None, min=0, max=1000, desc_short=None, desc=None, list_titles=None, wiz_element_type='default', wiz_combo_choices=None, wiz_combo_data=None, wiz_combo_iter=None, wiz_combo_list_size=None, wiz_read_only=None, can_be_none=False, can_be_empty=False, none_elements=False): """Wrapper method for adding keyword argument information to the container. @keyword name: The name of the argument. @@ -257,7 +257,10 @@ arg['desc'] = desc arg['list_titles'] = list_titles arg['wiz_element_type'] = wiz_element_type - arg['wiz_combo_choices'] = wiz_combo_choices + if wiz_combo_choices == None: + arg['wiz_combo_choices'] = [] + else: + arg['wiz_combo_choices'] = wiz_combo_choices arg['wiz_combo_data'] = wiz_combo_data arg['wiz_combo_iter'] = wiz_combo_iter arg['wiz_combo_list_size'] = wiz_combo_list_size