Closed GoogleCodeExporter closed 9 years ago
Forgot to finish the summary :P
Original comment by Alex.Rui...@gmail.com
on 2 Dec 2008 at 2:23
I see, you already wrote a method for that :-)
It does seem to work like this:
/** {@inheritDoc} */
public void enterText(String text) {
if (isEmpty(text)) return;
for (char character : text.toCharArray()) {
int keycode = KeyStrokeMap.keyStrokeFor(character).getKeyCode();
int modifiers = KeyStrokeMap.keyStrokeFor(character).getModifiers
();
keyPressAndRelease(keycode,modifiers);
waitForIdle();
}
}
Running the test becomes a bit! slower though, which is not much of a
suprise
and may also be partly because of my databinding implementation.
Also I noticed that the KeyStrokeMap remains empty if not in an en-
locale, it
may be better default-behaviour if at least filling with the values
for en.
Greetings
Marc
Original comment by goo...@johnen.biz
on 4 Dec 2008 at 11:31
Thanks Marc! I filed issue 250 to take care of KeyStrokeMap for non-en locales.
Original comment by Alex.Rui...@gmail.com
on 5 Dec 2008 at 7:29
Hi Marc,
Actually your implementation is the same as the current one. I suspect that the
source of the problem was issue 250. Once I fixed that one, the test for issue
245
passed without changing the implementation of "enterText".
Here is the test case for issue 245:
http://code.google.com/p/fest/source/browse/trunk/fest/fest-swing/src/test/java/
org/fest/swing/core/Bug245_EnterTextNotRaisingKeyReleaseEventTest.java
Thanks,
-Alex
Original comment by Alex.Rui...@gmail.com
on 5 Dec 2008 at 7:54
Original issue reported on code.google.com by
Alex.Rui...@gmail.com
on 2 Dec 2008 at 2:23