[Gambas-user] Keyboard function skipped?

Eilert eilert-sprachen at ...221...
Thu Jun 3 13:11:18 CEST 2004


Hi,

The other day I was trying to implement something counting the text 
length in a text area. Very simple thing, just count the keystrokes from 
within TextArea1_KeyPress...

However, I found that when I type too fast (I can type fast, about 250 - 
280 chars/minute) the counter would skip some characters.

So I decided to measure the length of the string within TextArea1 
instead, but isn't that strange?

It is even more strange because there are two things done within my 
KeyPress function:

1. Sort out which key was pressed, only let characters pass through

2. Count

The first one will run with every speed, no problem. It's just the 
second one which is skipped. There is a select case block figuring out 
the type of the key pressed and a case else at its end containing the 
counter. So every "case" works well blocking the special keys 
(movements, backspace etc.), but when I type a real character it might 
be ignored if too fast!

Any explanation for that?

Rolf





More information about the User mailing list