Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Revision as of 04:36, 9 August 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Value of TextField.NUMERIC is limited to 10 digits in Series 40 (Known Issue)

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): All Series 40 devices
Created: User:Technical writer 1 (April 2, 2008, updated April 16, 2008)
Last edited: hamishwillee (09 Aug 2013)



In Series 40, the value of TextField.NUMERIC must not exceed the value of 2147483646 (Integer.MAX_VALUE-1), otherwise an IllegalArgumentException is thrown.


The integer value inserted in TextField defined with the TextField.NUMERIC constraint must not exceed the value of 2147483646 (i.e. Integer.MAX_VALUE-1) in Series 40, otherwise an IllegalArgumentException is thrown. In S60, this value may be exceeded without the exception.

How to reproduce

Use, for example, the following piece of code to reproduce this issue:

   TextField textField = new TextField("Enter Number:", "", 10, TextField.NUMERIC);
long n = Integer.MAX_VALUE;
System.out.println("OK for Integer.MAX_VALUE, i.e. " + n);
try {
catch (IllegalArgumentException e) {
System.out.println("FAILED for Integer.MAX_VALUE + 1, i.e. " + n);


Avoid using values starting from Integer.MAX_VALUE and higher with the TextField.NUMERIC constraint in Series 40.

This page was last modified on 9 August 2013, at 04:36.
45 page views in the last 30 days.