Oups a small mistake:

bt=application.get_widget('button1')

[EMAIL PROTECTED] wrote:
> Hi....
>
>
> i am trying to implement the following:
>
> I want to be able to press a button, perform a task and return a
> value.
>
> my button is named button1 and I used glade to build the gui.
>
> so, something like this should work....
>
>
> application=gtk.glade.XML('app.glade','app')
> bt=app.get_widget('button1')
> bt.connect('clicked',on_btClicked)
> def on_btClicked(widget,event):
>       if data==0:
>          P=1
>       else:
>          P=2
>       return P
>
> How can I get P?
>
> Something like this doesn't work:
>
> bt.connect('clicked',P=on_btClicked)
>
> How can I return P???
>
>
> Thanks!
>
> Nick

-- 
http://mail.python.org/mailman/listinfo/python-list
  • pygtk button event [EMAIL PROTECTED]
    • correction : Re: pygtk button event [EMAIL PROTECTED]

Reply via email to