On Tue, Jul 29, 2003 at 11:03:07AM -0400, John Ehresman wrote:
> That would work but it would further complicate things, particularly 
> since the _disconnect_callback() is a generic function.  I suppose I could 
> maintain a list of connections and then implement my own disconnect() 
> function that would remove things from the list, but then I'd need to call 
> that disconnect function rather than the disconnect method.  It might be 
> better to add some method to check to see if the handler is still 

I didn't understand you fully. Even if it is a generic function, storing
a list (or a hash if it becomes necessary) of IDs is safe, since IDs are
unique globally across your application. Then check if the ID is in the
list and remove it otherwise.

This does mean you need shared state between code that requires it,
though (maybe use a central SignalManager that stores the state).

> connected and only call disconnect if it is.  Does a function to check if 
> a handler is connected exist in the C api?

Not sure, check out the docs for GObject.

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | 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/

Reply via email to