-
30 Jan 2012 3:30 PM #1
ArrayIndexOutOfBoundsException on NumberField<T>.setAllowDecimals
ArrayIndexOutOfBoundsException on NumberField<T>.setAllowDecimals
Here's the code:
In theory, I think a developer might expect the allowDecimals property to be set implicitly to false because he/she is specifying an integer type with an integer property editor and integers are whole numbers.Code:import com.google.gwt.core.client.EntryPoint; import com.sencha.gxt.widget.core.client.form.NumberField; import com.sencha.gxt.widget.core.client.form.NumberPropertyEditor; public class MainEntry implements EntryPoint { @Override public void onModuleLoad() { NumberField<Integer> integerField = new NumberField<Integer>(new NumberPropertyEditor.IntegerPropertyEditor()); integerField.setAllowDecimals(false); // throws an exception } }
If I don't call setAllowDecimals the field allows the . character which as previously mentioned violates the premise of having an integer field.
-
17 Feb 2012 3:25 PM #2
Fixed in beta 3 per release notes:
[EXTGWT-1350] - Exception is thrown when setting allow decimals to false on a NumberField
Success! Looks like we've fixed this one. According to our records the fix was applied for
a bug in our system
in
a recent build.


Reply With Quote