PDA

View Full Version : [FIXED] [1.2.3] NumberField<Integer> error - the type is not NumberField generic



The_Jackal
15 Mar 2009, 11:07 PM
Hi,

I raised a bug that I couldn't use TextField<Integer> and was directed to use NumberField (see http://extjs.com/forum/showthread.php?t=62660).

The java doc is incorrect - NumberField can not be parameterized with generics. It extends from TextField<Number> but does not have a generic constructor.

The full comiler error is:

The type NumberField is not generic; it cannot be parameterized with arguments <Integer>


The javadoc states:



NumberField<Integer> field = new NumberField<Integer>;
field.setPropertyEdtiorType(Integer.class);
When the correct code is:


NumberField field = new NumberField();
field.setPropertyEdtiorType(Integer.class);
Regards,
The Jackal

sven
16 Mar 2009, 4:05 AM
Thanks, we will update the javadocs.

sven
1 Apr 2009, 4:17 AM
Fixed in SVN.

zaccret
1 Apr 2009, 8:45 AM
Huh... Why not add a parameter to NumberField (N extends Number) instead of changing the javadoc ?

sdc
2 Apr 2009, 12:14 AM
Huh... Why not add a parameter to NumberField (N extends Number) instead of changing the javadoc ?
+1

sdc
2 Apr 2009, 12:16 AM
Mmm. Maybe it is not relevant here to add a parameter as you have to give a specific Class to the property editor.