[Gambas-user] GTK key events bug

Carlos Prieto López cplopez at ...626...
Thu Aug 6 18:14:53 CEST 2009


> > 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pruebagtk.tar.gz
Type: application/x-compressed-tar
Size: 8056 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20090806/f9cc5fb2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prueba.tar.gz
Type: application/x-compressed-tar
Size: 7986 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20090806/f9cc5fb2/attachment-0001.bin>


More information about the User mailing list