> Using Gambas 2.20, Ubuntu 9.10 with KDE 4.3.5 and GTK+ libraries > > Key.Code is not returned? Key.Text is lost? KeyRelease is not raised? > > Put a TextBox in a Form, then write the code to catch the pressed key. > Run it and press a number o letter key. > > PUBLIC SUB TextBox1_KeyPress() > PRINT Key.Code > PRINT Key.Text > END > > PUBLIC SUB TextBox1_KeyRelease() > PRINT Key.Code > PRINT Key.Text > END > > Result Tests (gb.qt) > ---------------------------- > > pressed the '5' key > > KeyPress: Key.Code = 53, Key.Text = "5" > > KeyRelease: Key.Code = 53, Key.Text = ""
Key.Text is not guaranteed to be set during a KeyRelease. > > Randomly KeyRelease wasn't raised. Please specify, I didn't notice any problem about that. > > > Result Test (gb.qt) I think you meant gb.gtk instead. > -------------------------- > > pressed the '5' key > > KeyPress: Key.Code = 0, Key.Text = "5" Yep, this is a bug I fixed in revision #2891. I'm almost sure that it worked before, so maybe a recent change in GTK+ made my code fail. > > KeyRelease: Key.Code = 53, Key.Text = "5" > > Randomly KeyRelease wasn't raised. Please specify, I didn't notice any problem about that. > > > Issues in two real proyects (I'm trying to isolate the problem): > --------------------------------------- > > KeyPress never is raised when gb.gtk is used. No, it is raised, but Key.Code was zero. > > KeyPress sometimes is not raised when gb.qt is used. As I said before, I didn't notice that. So if you can tell me how to reproduce it, it would be a great thing. > > Key.Text is lost when the event KeyRelease is raised. It is actually not lost, it is just that it should be set only during a KeyPress event. gb.gtk is just more clever there. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user