That's a bug Jeff !
 
I'll file that,
Thanks,
-sam

 
On 8/29/06, Jeff Tapper <[EMAIL PROTECTED]> wrote:

The fundamental problem isn't a non-broadcast event, its that a non
required NumberValidator, as designed, will not return an error state if a
string is passed to it. This doesn't meet my needs on my current (or
likely any), project. I've sub-classed it so that even when its
non-required, it will show an error state if the element in question is a
string in not a number (NaN).

I know in previous versions of flex, the number validator behaved as I
expected, and was easily capable of showing a "Not a number" error, whether
or not the field was required, which was the cause of my concern. The fix
was easy enough (~30 line sub class), so its no big deal.



At 06:38 AM 8/29/2006, Michael Schmalle wrote:

>Hi sam,
>
>Well, that comment came for a programmer. ;-) Strictly looking at the code
>as if I was going to tie it to another class, not mxml for validation.
>
>I guess the comment was more straight from my developer mind and through
>not really seeing the 'process' all the way through I said it. As far at
>what you said, that makes sense.
>
>You might want to ask Jeff the same question as to what he is doing
>extending and needing NaN. As far as me and the event, well that was more
>philosophical. :)
>
>Peace, Mike
>
>On 8/29/06, Samuel Reuben <<mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]> wrote:
>
>Hi Michael,
>
>You have mentioned that it shoud send some sort of message with the event.
>What do you want this for?
>
>The error tips are shown for the inputs that are not number. So like any
>other validator it doesn't show any error tip when it is right.
>The error tips that are shown are meant to be readable to the common user
>and not be cryptic.
>
><?xml version="1.0 " encoding="iso-8859-1"?> <mx:Application

> <mx:NumberValidator source="{numberInput}" domain="real" property="text"/>
> <mx:TextInput id="numberInput" width="100%"/>
> <mx:Button label="Click Me!" />
></mx:Application>
>
>Trying to understand what is needed here,
>thanks,
>-sam
>
>
>On 8/28/06, Michael Schmalle <<mailto:[EMAIL PROTECTED]>

>[EMAIL PROTECTED]> wrote:
>
>Hi,
>
>Yeah, I guess if I would have looked into the superclass I would have saw
>that. :)
>
>That is odd and I to wonder why they at least didn't send some sort of
>message with the event then just saying it is VALID.
>
>Maybe they are expecting you to catch NaN before any invalidation occurs
>but, that still doesn't make sense either.
>
>
>Peace, Mike
>
>On 8/28/06, Jeff Tapper <<mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]> wrote:
>
>it is, unfortunately, the place they call that doesnt perform valiation.
>
>if (isRealValue(value) || required)
>{
>return processValidation(value, suppressEvents);
>}
>else
>{
>// Just return valid
>return new ValidationResultEvent(ValidationResultEvent.VALID);
>}
>
>so, if isRealValue returns false, they dispatch a valid event and do no
>more checking. I've subclassed NumberValidator to make it work as i would
>expect. Seems an odd choice that a NumberValidator wont validate that the
>input isnt a number.
>
>
>At 01:14 PM 8/28/2006, you wrote:
>
> >Hi,
> >
> >seems like the logicve is there;
> >
> >"""
> > /**
> > * Determines if the value is not null and not NaN value.
> > */
> > override protected function isRealValue(value:Object):Boolean
> > {
> > return ((value != null) && !isNaN(Number(value)));
> > }
> >""
> >
> >Peace, Mike
> >
> >On 8/28/06, Jeff Tapper < <mailto:jeff%40tapper.net >[EMAIL PROTECTED]> wrote:
> >
> >Am i missing something basic, or does the NumberValidator not contain the
> >infrastructure to ensure that the specified value is a number? I'm nearly
> >certian that the NumberValidator could perform a NaN check as well as
> >validating from within a range. Do we need to roll that ourselves in
> Flex 2?
> >
> >
> >
> >
> >--
>
> >What goes up, does come down.
>
>
>
>
>--
>
>What goes up, does come down.
>
>
>
>
>
>--
>What goes up, does come down.


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to