Author: bugman Date: Tue May 22 16:49:36 2012 New Revision: 16396 URL: http://svn.gna.org/viewcvs/relax?rev=16396&view=rev Log: The Combo_list.GetValue() method now returns a proper list of values rather than the string repr. Modified: branches/uf_redesign/gui/input_elements/combo_list.py Modified: branches/uf_redesign/gui/input_elements/combo_list.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/input_elements/combo_list.py?rev=16396&r1=16395&r2=16396&view=diff ============================================================================== --- branches/uf_redesign/gui/input_elements/combo_list.py (original) +++ branches/uf_redesign/gui/input_elements/combo_list.py Tue May 22 16:49:36 2012 @@ -254,41 +254,32 @@ def GetValue(self): """Return the value represented by this GUI element. - @return: The list of choices as a GUI string. - @rtype: unicode - """ - - # Build the string form of the list. - text = u'[' + @return: The list of choices. + @rtype: list + """ # Loop over the combo boxes. + data = [] n = 0 for i in range(len(self._combo_boxes)): # Get the value. val = self.convert_from_gui(self._combo_boxes[i].GetClientData(self._combo_boxes[i].GetSelection())) # Nothing, so skip. - if val == None or not len(val): + if val == None: continue - # Add a comma. - if len(text) > 1: - text = "%s, " % text - # Add the value. - text = "%s'%s'" % (text, val) + data.append(val) # Increment the number. n += 1 - - # End. - text = "%s]" % text # Return the list. if self._min_length != None and n < self._min_length: return None else: - return text + return data def SetValue(self, value=None, index=None):