mailr16189 - /branches/uf_redesign/user_functions/objects.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on May 10, 2012 - 14:45:
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]




Related Messages


Powered by MHonArc, Updated Thu May 10 15:00:01 2012