Sorry, Validators in 1.5 can't accept binding, they're special
components.  We changed that in 2.0.  

Matt

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of KAZUYA KOMON
Sent: Monday, February 20, 2006 12:05 AM
To: [email protected]
Subject: [flexcoders] Validatior's binding problem?

Hi, all


I'm trying to bind attribute from MXML file to custom validator.
(using 1.5)


// Code(MXML) :
<RequiredFieldValidator xmlns="*" field="formData.text" 
    numLength="{name.maxChars}"/>
    ^^^^^^^^^
<mx:TextInput id="name" width="200" maxChars="5" />


// Code(ActionScript - RequiredFieldValidator.as) :
class RequiredFieldValidator extends mx.validators.Validator {
    var numLength:Number;
        ^^^^^^^^^
    ...
}


If I set number directory (ex. numLength="5") , I can.
But if I use binding, I can't.
Is there something a good idea?

Any help is greatly appreciate.


Thanks,
KAZUYA KOMON


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



 




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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to