[Gambas-user] There are errors in the class "Key", and in the events KeyPress / KeyRelease?

Fabián Flores Vadell fabianfloresvadell at ...626...
Tue Apr 13 00:52:33 CEST 2010


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 = ""

Randomly KeyRelease wasn't raised.


Result Test (gb.qt)
--------------------------

pressed the '5' key

KeyPress: Key.Code = 0, Key.Text = "5"

KeyRelease: Key.Code = 53, Key.Text = "5"

Randomly KeyRelease wasn't raised.


Issues in two real proyects (I'm trying to isolate the problem):
---------------------------------------

KeyPress never is raised when gb.gtk is used.

KeyPress sometimes is not raised when gb.qt is used.

Key.Text is lost when the event KeyRelease is raised.

-- 
Fabián Flores Vadell
www.speedbooksargentina.blogspot.com




More information about the User mailing list