Looks good, but I think you mean:

      public DoubleRangeValidator() {
-        this.minValue = 0;
-        this.maxValue = 1;
+        this.minValue = -Double.MAX_VALUE;
+        this.maxValue = Double.MAX_VALUE;
    }


On Thu, Feb 25, 2010 at 19:45, Todd Volkert <tvolk...@gmail.com> wrote:
> I like it :)
>
> -T
>
> On Thu, Feb 25, 2010 at 12:06 PM, Greg Brown <gkbr...@mac.com> wrote:
>
>> I did. I thought it was only source attachments that got dropped. Here it
>> is:
>>
>> Index:
>> wtk/src/org/apache/pivot/wtk/text/validation/FloatRangeValidator.java
>> ===================================================================
>> --- wtk/src/org/apache/pivot/wtk/text/validation/FloatRangeValidator.java
>>     (revision 912430)
>> +++ wtk/src/org/apache/pivot/wtk/text/validation/FloatRangeValidator.java
>>     (working copy)
>> @@ -22,14 +22,14 @@
>>     private float minValue, maxValue;
>>
>>     public FloatRangeValidator() {
>> -        this.minValue = 0;
>> -        this.maxValue = 1;
>> +        this.minValue = Float.MIN_VALUE;
>> +        this.maxValue = Float.MAX_VALUE;
>>     }
>>
>>     public FloatRangeValidator(Locale locale) {
>>         super(locale);
>> -        this.minValue = 0;
>> -        this.maxValue = 1;
>> +        this.minValue = Float.MIN_VALUE;
>> +        this.maxValue = Float.MAX_VALUE;
>>     }
>>
>>     public FloatRangeValidator(float minValue, float maxValue) {
>> Index:
>> wtk/src/org/apache/pivot/wtk/text/validation/DoubleRangeValidator.java
>> ===================================================================
>> --- wtk/src/org/apache/pivot/wtk/text/validation/DoubleRangeValidator.java
>>      (revision 912430)
>> +++ wtk/src/org/apache/pivot/wtk/text/validation/DoubleRangeValidator.java
>>      (working copy)
>> @@ -22,14 +22,14 @@
>>     private double minValue, maxValue;
>>
>>     public DoubleRangeValidator() {
>> -        this.minValue = 0;
>> -        this.maxValue = 1;
>> +        this.minValue = Double.MIN_VALUE;
>> +        this.maxValue = Double.MAX_VALUE;
>>     }
>>
>>     public DoubleRangeValidator(Locale locale) {
>>         super(locale);
>> -        this.minValue = 0;
>> -        this.maxValue = 1;
>> +        this.minValue = Double.MIN_VALUE;
>> +        this.maxValue = Double.MAX_VALUE;
>>     }
>>
>>     public DoubleRangeValidator(double minValue, double maxValue) {
>> Index: wtk/src/org/apache/pivot/wtk/text/validation/IntRangeValidator.java
>> ===================================================================
>> --- wtk/src/org/apache/pivot/wtk/text/validation/IntRangeValidator.java
>> (revision 912430)
>> +++ wtk/src/org/apache/pivot/wtk/text/validation/IntRangeValidator.java
>> (working copy)
>> @@ -22,14 +22,14 @@
>>     private int minValue, maxValue;
>>
>>     public IntRangeValidator() {
>> -        this.minValue = 0;
>> -        this.maxValue = 1;
>> +        this.minValue = Integer.MIN_VALUE;
>> +        this.maxValue = Integer.MAX_VALUE;
>>     }
>>
>>     public IntRangeValidator(Locale locale) {
>>         super(locale);
>> -        this.minValue = 0;
>> -        this.maxValue = 1;
>> +        this.minValue = Integer.MIN_VALUE;
>> +        this.maxValue = Integer.MAX_VALUE;
>>     }
>>
>>     public IntRangeValidator(int minValue, int maxValue) {
>>
>>
>> On Feb 25, 2010, at 11:54 AM, Todd Volkert wrote:
>>
>> > I assume you attached a patch, but it didn't come through.
>> >
>> > -T
>> >
>> > On Thu, Feb 25, 2010 at 11:17 AM, Greg Brown <gkbr...@mac.com> wrote:
>> >
>> >> Anyone have any issues with this change? I think it makes the range
>> >> validators a bit more useful, since I can do something like this to
>> ensure
>> >> that the user enters a positive value (my use case is a currency
>> amount):
>> >>
>> >> <text:FloatRangeValidator minValue="0"/>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>>
>>
>

Reply via email to