In 1.5 you can only access the validator instance in the validate event handler, so that’s where you’d need to do your work.

 

<mx:StringValidator field=”…” validate=”myButton.enabled = !event.validator.hasErrors()” />

 


From: [email protected] [mailto:[email protected]] On Behalf Of Libby
Sent: Thursday, December 01, 2005 1:24 PM
To: [email protected]
Subject: [flexcoders] Re: Could someone point me to an example of validator.hasErrors()

 

I would like to disable a button, from ActionScript, if the
validator.hasErrors(). It can't be that difficult, can it?


--- In [email protected], "Libby" <libby[EMAIL PROTECTED]> wrote:
>
> I can't find an example and I guess I don't understand how it is to be
> used from actionscript.
>
> I am expecting to be able to do something like this:
> if(theDocument.validators.myValidator.hasErrors()) {
>     // handle it;
> }
>
> but I can't figure out how to get there from here.
>
> thanks,
> Libby
>








--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to