Re: [pygtk] check button callbacks

2003-10-22 Thread Michael McLay
On Monday 29 September 2003 08:51 am, liquid wrote: > Hi guys > I'm really a newbie of python and pygtk, so sorry if my question is... too > dumb (o: Welcome to Python. No question is too dumb from a newbie:-) There mailing lists specifically for these types of questions. As was mentioned earlier

Re: [pygtk] check button callbacks

2003-10-22 Thread Michael McLay
On Monday 29 September 2003 08:51 am, liquid wrote: > Hi guys > I'm really a newbie of python and pygtk, so sorry if my question is... too > dumb (o: Welcome to Python. No question is too dumb from a newbie:-) There mailing lists specifically for these types of questions. As was mentioned earlier

Re: [pygtk] check button callbacks

2003-09-29 Thread Christian Reis
On Mon, Sep 29, 2003 at 03:42:28PM +0200, liquid wrote: > can you explain to me how I can make 'a' a class variable? Use self.a (and read the Python tutorial! :-) Take care, -- Christian Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331 ___ pygtk

Re: [pygtk] check button callbacks

2003-09-29 Thread liquid
On Monday 29 September 2003 15:17, Igor Stroh wrote: > add 'global a' to callback(): > def callback(self, widget, data=None): > global a > a = "%s" % ((3, 4)[widget.get_active()] > > However, using global variables is bad style, why don't you make 'a' a > class variable? > > HTH, > Igo

Re: [pygtk] check button callbacks

2003-09-29 Thread Igor Stroh
On Mon, 2003-09-29 at 14:51, liquid wrote: ... > def callback(self, widget, data=None): >a = "%s" % ((3, 4)[widget.get_active()]) > add 'global a' to callback(): def callback(self, widget, data=None): global a a = "%s" % ((3, 4)[widget.get_active()] However

Re: [pygtk] check button callbacks

2003-09-29 Thread Christian Reis
On Mon, Sep 29, 2003 at 02:51:53PM +0200, liquid wrote: > def callback(self, widget, data=None): > a = "%s" % ((3, 4)[widget.get_active()]) > > button.connect("toggled", self.callback, "check button 1") Try connect_after() -- your callback might be called too ear

[pygtk] check button callbacks

2003-09-29 Thread liquid
Hi guys I'm really a newbie of python and pygtk, so sorry if my question is... too dumb (o: I'm tring to understand how to set a value to a variable, with check buttons. I will post here what I'm doing...or better...tring to do. when I check the button I would like that the variable a will be set