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
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 xmlns:mx=" http://www.adobe.com/2006/mxml">
<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 < [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 <[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 < [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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- Re: [flexcoders] NumberValidator question Samuel Reuben
- Re: [flexcoders] NumberValidator question Michael Schmalle
- Re: [flexcoders] NumberValidator question Jeff Tapper
- Re: [flexcoders] NumberValidator question Samuel Reuben
Reply via email to

