On Sun, May 26, 2002 at 08:50:03AM -0600, Collins wrote:
> Is there a way to code a python function that receives an object that
> can be invoked in that function, i.e. the equivalent of passing in a
> pointer to funtion in C code and invoking that function or passing its
> address to another function.
Yes, of course; all functions in Python are objects and can be passed
normally as parameters.
> Something like the following code snippet.
>
> def callback(widget,entry) :
> pass
>
> def function(rtn1) :
> . . .
> b2 = GtkRadioButton(label="Full list")
> b2.connect("pressed", rtn1, b2)
> ...
>
> ...
> function(callback)
> ...
Will work, haven't you tried it?
Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/