[Gambas-user] GTK key events bug

Benoît Minisini gambas at ...1...
Thu Aug 6 17:46:33 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




More information about the User mailing list