Results 1 to 2 of 2

Thread: ArrayIndexOutOfBoundsException on NumberField<T>.setAllowDecimals

    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.
  1. #1
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    413
    Vote Rating
    21
      0  

    Exclamation ArrayIndexOutOfBoundsException on NumberField<T>.setAllowDecimals

    Here's the code:

    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
      }
    }
    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.

    If I don't call setAllowDecimals the field allows the . character which as previously mentioned violates the premise of having an integer field.

  2. #2
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    413
    Vote Rating
    21
      0  

    Default

    Fixed in beta 3 per release notes:

    [EXTGWT-1350] - Exception is thrown when setting allow decimals to false on a NumberField

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •