[Gambas-user] GTK key events bug

craf prog at ...2177...
Thu Aug 6 23:10:20 CEST 2009


-----Mensaje original-----
De: Benoît Minisini <gambas at ...1...>
Reply-to: mailing list for gambas users
<gambas-user at lists.sourceforge.net>
Para: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Asunto: Re: [Gambas-user] GTK key events bug
Fecha: Thu, 6 Aug 2009 22:52:35 +0200


> > > Summary: In a graphical application using GTK, a key event produced
> >
> > by a
> >
> > > control is captured by the parent, but key event information
> >
> > provided by
> >
> > > the Key class is not available.
> > >
> > > How to reproduce: In a GTK project, put a form, a control (for
> >
> > example,
> >
> > > a textbox), and the following code:
> > >
> > > PUBLIC SUB Form_KeyRelease()
> > >
> > >   DEBUG Key.Code
> > >
> > > END
> > >
> > > Press a key when the control (not the form) has the focus, and the
> >
> > error
> >
> > > "No keyboard event data." will be produced. This happens in any
> >
> > control
> >
> > > and its container, as far as I've seen.
> > >
> > > Expected behaviour: The information of the pressed key should be
> > > available to the parent also.
> > >
> > > Comments: This can be worse with other controls. For example, a
> >
> > TreeView
> >
> > > control, when editing, shows a textbox, whose events are hidden to
> >
> > the
> >
> > > Treeview user. Therefore, key events on the textbox cannot be
> >
> > handled,
> >
> > > and key-related code put on the treeview's KeyRelease event will
> >
> > raise
> >
> > > an error. This problem does NOT happen with Qt.
> > >
> > > Configuration:
> > > Intel Core2 Duo @ 2GiHz, 2GiB ram
> > > Ubuntu 8.04, kernel 2.6.24-24 generic
> > > Gambas 2.15.2-1, GTK
> >
> > Please can you send a project that shows that bug? I cannot reproduce
> > it there
> > with your explanations.
> >
> > I put a textbox inside a form, and only GTK forms catch the keyboard
> > events
> > from the textbox, not QT forms!
> >
> > Regards,
> >
> > --
> > Benoît
>
> I attach the project with the error (pruebagtk.tar.gz). Type anything on
> the textbox, and the error will show (this was a GTK graphic
> application).
>
> The project inside prueba.tar.gz was created as QT graphic application;
> when typing on the textbox, the key code is printed on the debug screen,
> and the event is not catched by the form.
>
> Best regards,
>
> Carlos

I have exactly the same behaviour I described above... Is your OS 64 bits?


Hi.

I tried the first example pruebagtk.tar.gz and no problems. 
I tried the second example prueba.tar-gz, which uses the QT, not shown
in the debug code of the key pressed. Is that wrong? 
I use: 
Ubuntu-9.04 - 32 bits 
Gambas-2.15.2 
-Gnome

Regards.



More information about the User mailing list