On Fri, Dec 05, 2003 at 06:13:06PM +0000, Jean-Baptiste Cazier wrote:
> After further investigation it seems that the routine called by my
> expose_event signal is generating itself new expose_event...

That's definitely not a good thing :-)

> To avoid that effect I would like to block the signal when entering
> the routine and unblock it while leaving but I have problem
> transferring the event id through the routine itself and to knwo to
> what I should apply it to How should i use signal_handler_block ?

Just store the event id in an instance or module variable (you could get
fancy and store it as widget data, if you really wanted to avoid the
external variable). You should block the signal handler any time it
risks recursing.

>     def area_expose_cb(self, area, event):
>       """ Update the DrawingArea """
> 
>       area.signal_handler_block(signal_id)
>       ...
>       Do something on the Drawing Area
>       ...
>       area.signal_handler_unblock(signal_id)  
>       return gtk.TRUE

Looks correct to me.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
_______________________________________________
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