This page was last modified 12:11, 23 August 2007.
KIJ000605 - ItemStateListener and setConstraints behave incorrectly
From Forum Nokia Wiki
itemStateListener and setConstraints behave incorrectly
|
KIJ000605
|
Overview
| Inserting text to a textField whose constraints are set by choiceGroup and controlled by an itemStateListener does not work as supposed on S60 devices.
|
Reported against
| S60 2nd Edition S60 3rd Edition Nokia N91, Nokia 6681, Nokia N72
|
Category
| Java
|
Subcategory
| MIDP1.0/2.0
|
Date identified
| March 30, 2007
|
Symptoms
| -
|
Detailed description
| If the current constraint of a textField is controlled by a choiceGroup and queried by an itemStateListener, the user cannot insert text into textField as normally. Inserting numbers (holding down the corresponding number key for a while) and special characters (from a menu) works, but inserting letters is impossible: the letter blinks on a screen for a brief moment and then disappears. The most recently inserted character also appears first in the string, which is the opposite of normal. If the user attempts to move the cursor manually to another position, it is automatically returned to the beginning of the field.
|
How to reproduce
| Write a MIDlet with a couple of text fields whose constraints are controlled by a choiceGroup and queried by itemStateListener.
|
Solution
| Do not use choiceGroup to control text fields. You can set the constraints of a text field directly to the text field control.
|