discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] trying to add a button...


From: James Cooley
Subject: Re: [Discuss-gnuradio] trying to add a button...
Date: Tue, 10 May 2005 18:14:53 -0400
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

This sort of code worked for me:

       hbox = wx.BoxSizer (wx.HORIZONTAL)
btn = wx.Button(self.panel, 1001, "STOP", style=wx.BU_EXACTFIT)
       wx.EVT_BUTTON(self.panel, 1001, self.quit)
       vbox.Add(btn, 0, wx.EXPAND)



mjam01 wrote:

Hi guys,

I'm trying to add a button to the tvrx_wfm_rcv_gui.py code with the
following placed under the vbox sliders:


button_freq_up = wx.Button(self, panel, 'FREQ UP')
vbox.Add(button_freq_up, 0, wx.ALL | wx.EXPAND, 5)
self.Bind(wx.EVT_BUTTON, self.set_freq_up, button_freq_up)


I get this error saying a pointer is expected and it's stumped me. Any ideas??!!


Traceback (most recent call last):
 File "./tvrx_nbfm_scanner.py", line 264, in ?
   app = stdgui.stdapp (wfm_rx_graph, "TVRX NBFM RX - M0MIK")
 File "/usr/local/lib/python2.3/site-packages/gnuradio/wxgui/stdgui.py",
line 35, in __init__
   wx.App.__init__ (self)
 File "/usr/lib/python2.3/site-packages/wx-2.5.3-gtk2-ansi/wx/_core.py",
line 5301, in __init__
   self._BootstrapApp()
 File "/usr/lib/python2.3/site-packages/wx-2.5.3-gtk2-ansi/wx/_core.py",
line 4980, in _BootstrapApp
   return _core_.PyApp__BootstrapApp(*args, **kwargs)
 File "/usr/local/lib/python2.3/site-packages/gnuradio/wxgui/stdgui.py",
line 38, in OnInit
   frame = stdframe (self.flow_graph_maker, self.title)
 File "/usr/local/lib/python2.3/site-packages/gnuradio/wxgui/stdgui.py",
line 59, in __init__
   self.panel = stdpanel (self, self, flow_graph_maker)
 File "/usr/local/lib/python2.3/site-packages/gnuradio/wxgui/stdgui.py",
line 80, in __init__
   self.fg = flow_graph_maker (frame, self, vbox, sys.argv)
 File "./tvrx_nbfm_scanner.py", line 205, in __init__
   button_freq_up = wx.Button(self, panel, 'Click me')
 File "/usr/lib/python2.3/site-packages/wx-2.5.3-gtk2-ansi/wx/_controls.py",
line 37, in __init__
   newobj = _controls_.new_Button(*args, **kwargs)
TypeError: Expected a pointer


Thanks,

mike
m0mik.org/gnuradio/


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio





reply via email to

[Prev in Thread] Current Thread [Next in Thread]