S�l !

I tried my example but without any sucess as the area is not suppose to have that 
method !

Traceback (most recent call last):
  File "./ldraw2.py", line 2884, in area_expose_cb
    area.window.signal_handler_block(self.signal_id)
AttributeError: 'gtk.gdk.Window' object has no attribute 'signal_handler_block'


I even tried with the window from area
Traceback (most recent call last):
  File "./ldraw2.py", line 2884, in area_expose_cb
    area.window.signal_handler_block(self.signal_id)
AttributeError: 'gtk.gdk.Window' object has no attribute 'signal_handler_block'


What has the signal_handler_block method ?

Any other idea on the way to proceed ?


Takk

Jean-Baptiste

On Fri, 5 Dec 2003 16:32:03 -0200
Christian Robottom Reis <[EMAIL PROTECTED]> wrote:

> 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


-- 
-----------------------------
[EMAIL PROTECTED]

Department of Statistics
deCODE genetics     Sturlugata,8
570 2993          101 Reykjav�k

_______________________________________________
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