[gtkada] Need help with Entry and Signals

Preben Randhol randhol at pvv.org
Mon Jun 5 09:39:06 CEST 2000


"Bobby D. Bryant" <bdbryant at mail.utexas.edu> wrote on 05/06/2000 (09:23)
:
> 
>       Gtk.Handlers.Emit_Stop_By_Name( Object => Widget, Name   =>
>       "key_press_event" );
> 
> where Widget is the same object that the callback handler was attached
> to (i.e., the first argument to the callback handler -- the Entry in
> your case).

Yes I did this (inside the if statement)

> The way I understand things [someone please correct me if I'm leading
> him astray!] is that when you establish a callback for an object it
> does *not* bump off any existing callback even for the same event; it
> simply puts the new callback in a line with the others (at the head of
> the line, unless you use the "After" variant).  Thus even after your
> handler has finished its business, some existing handler is still
> intercepting and acting on the arrow key.  However, by using
> Emit_Stop_By_Name you tell all the handlers in line after the current
> one to ignore the current event of the type in the name.

Yes this is correct. However it looks like the key_press_event is
propangated to the parent of the entry widget. I'm wondering how I can
stop this.

> If you still have problems after adding the call described above, you
> might want to take a peak at the C source code for GTK+ to see exactly
> what callbacks it is setting up for an Entry widget.

Will do.

-- 
Preben Randhol -- [randhol at pvv.org] -- <http://www.pvv.org/~randhol/>
         "Det eneste trygge stedet i verden er inne i en fortelling."
                                                      -- Athol Fugard





More information about the gtkada mailing list