[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9794 - gnuradio/trunk/grc/src/grc_gnuradio/wxgui
From: |
jblum |
Subject: |
[Commit-gnuradio] r9794 - gnuradio/trunk/grc/src/grc_gnuradio/wxgui |
Date: |
Tue, 14 Oct 2008 00:05:59 -0600 (MDT) |
Author: jblum
Date: 2008-10-14 00:05:58 -0600 (Tue, 14 Oct 2008)
New Revision: 9794
Modified:
gnuradio/trunk/grc/src/grc_gnuradio/wxgui/callback_controls.py
Log:
str cast
Modified: gnuradio/trunk/grc/src/grc_gnuradio/wxgui/callback_controls.py
===================================================================
--- gnuradio/trunk/grc/src/grc_gnuradio/wxgui/callback_controls.py
2008-10-14 05:16:46 UTC (rev 9793)
+++ gnuradio/trunk/grc/src/grc_gnuradio/wxgui/callback_controls.py
2008-10-14 06:05:58 UTC (rev 9794)
@@ -263,9 +263,8 @@
for obj in (label_text, text_box): #fill the container with
label and text entry box
label_text_sizer.Add(obj, 0,
wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL)
self.Add(label_text_sizer, 0, wx.ALIGN_CENTER)
- #set the value, detect string mode
+ #detect string mode
self._string_mode = isinstance(value, str)
- self.text_box.SetValue(str(value))
def get_value(self):
"""
@@ -280,7 +279,8 @@
If the text cannot be evaluated, do not try callback.
Do not evaluate the text box value in string mode.
"""
- if self._string_mode: self._value = self.text_box.GetValue()
+ if self._string_mode:
+ self._value = str(self.text_box.GetValue())
else:
try: self._value = eval(self.text_box.GetValue())
except Exception, e:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9794 - gnuradio/trunk/grc/src/grc_gnuradio/wxgui,
jblum <=