Author: bugman Date: Thu May 10 14:45:42 2012 New Revision: 16189 URL: http://svn.gna.org/viewcvs/relax?rev=16189&view=rev Log: Check that wiz_read_only is not set if can_be_none is True and a combo box is asked for. The combo box needs to be editable to clear it - so it returns None. Otherwise if a user selects one of the values, then they cannot unset it to allow for args of None. 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=16189&r1=16188&r2=16189&view=diff ============================================================================== --- branches/uf_redesign/user_functions/objects.py (original) +++ branches/uf_redesign/user_functions/objects.py Thu May 10 14:45:42 2012 @@ -237,6 +237,10 @@ if desc == None: raise RelaxError("The 'desc' argument must be supplied.") + # The combo box. + if wiz_element_type == 'combo' and can_be_none and wiz_read_only: + raise RelaxError("An argument set as a combo box and which can be None cannot be read only!") + # Append a new argument dictionary to the list, and alias it. self.kargs.append({}) arg = self.kargs[-1]