Changeset 9794

Show
Ignore:
Timestamp:
10/14/08 00:05:58
Author:
jblum
Message:

str cast

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gnuradio/trunk/grc/src/grc_gnuradio/wxgui/callback_controls.py

    r9793 r9794  
    264264                        label_text_sizer.Add(obj, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL) 
    265265                self.Add(label_text_sizer, 0, wx.ALIGN_CENTER) 
    266                 #set the value, detect string mode 
     266                #detect string mode 
    267267                self._string_mode = isinstance(value, str) 
    268                 self.text_box.SetValue(str(value)) 
    269268 
    270269        def get_value(self): 
     
    281280                Do not evaluate the text box value in string mode. 
    282281                """ 
    283                 if self._string_mode: self._value = self.text_box.GetValue() 
     282                if self._string_mode: 
     283                        self._value = str(self.text_box.GetValue()) 
    284284                else: 
    285285                        try: self._value = eval(self.text_box.GetValue())