On Sun, Sep 03, 2006 at 08:37:13AM +0200, Pascal DUCHATELLE wrote:
>          dic = {"on_mainWindow_destroy" : gtk.main_quit,
>                 "on_hello_key_press_event" : self.hellorecompile}
>  followed by this:
>          self.wTree.signal_autoconnect(dic)
>  Is there a way to use the second solution but also pass 
>  an argument like in the first one ?

You can use a tuple in your dic.  See

http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq22.004.htp

Also, you can use a closure:

foo = 5
baz = 6
def my_handler(*args):
    print foo
    print baz
    
dic = {"some_handle" : my_handler}

Dave Cook
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to