summaryrefslogtreecommitdiff
path: root/gr-wxgui/src/python/common.py
diff options
context:
space:
mode:
authorjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>2008-10-08 14:56:34 +0000
committerjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>2008-10-08 14:56:34 +0000
commit55ef8d97a4de54f41df8fe9fa53397ab813a8af8 (patch)
tree1f01bbbe42de141483856506a336430a911bb16a /gr-wxgui/src/python/common.py
parenta3e0ae23c39b34c5f652c8ae830e6fe33342817c (diff)
custom wx event to post data, avoid threading issues
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9749 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-wxgui/src/python/common.py')
-rw-r--r--gr-wxgui/src/python/common.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gr-wxgui/src/python/common.py b/gr-wxgui/src/python/common.py
index 4297648825..e54f4dbf15 100644
--- a/gr-wxgui/src/python/common.py
+++ b/gr-wxgui/src/python/common.py
@@ -24,6 +24,12 @@ import numpy
import math
import wx
+EVT_DATA = wx.NewEventType()
+class DataEvent(wx.PyEvent):
+ def __init__(self, data):
+ wx.PyEvent.__init__(self, wx.NewId(), EVT_DATA)
+ self.data = data
+
class prop_setter(object):
def _register_set_prop(self, controller, control_key, *args):
def set_method(value): controller[control_key] = value