Re: RE: [flexcoders] Validatior's binding problem?

2006-02-22 Thread KAZUYA KOMON
Hi,

oh peter, Thank you very much !!
It works very fine! Super!

Best Regards,
KAZUYA KOMON


- Original Message -
From : Peter Watson [EMAIL PROTECTED]
To : flexcoders@yahoogroups.com
Sent : Wed, 22 Feb 2006 04:56:08 -0800
Subject : RE: [flexcoders] Validatior's binding problem?


 Hi Kazuya,
 
  
 
 As Matt said - in Flex 1.5, validators don't support binding.
 
  
 
 Below is a workaround for your issue.  
 
  
 
 I got most of the code from here:
 
 http://blog.daemon.com.au/archives/000317.html
 
  
 
  
 
 Main.mxml
 
 *
 
 ?xml version=1.0 encoding=utf-8?
 
 mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
 xmlns:local=*
 
 mx:Script
 
 ![CDATA[
 
 function testField( validator, value ){
 
 validator.numLength =
 name1.maxChars;
 
 //debug
 
 //mx.core.Application.alert(validator.numLength);
 
  
 validator.doValidation(value);
 
 }
 
 ]]
 
 /mx:Script
 
 
 
 mx:Model id=test
 
 firstField{name1.text}/firstField
 
 secondField{name2.text}/secondField
 
 /mx:Model
 
 
 
 local:RequiredFieldValidator xmlns=*
 field=test.secondField validate=testField(event.validator,
 event.value)/
 
 
 
 mx:Form
 
 mx:FormItem
 
 mx:TextInput id=name1
 maxChars=5/
 
 /mx:FormItem
 
 mx:FormItem
 
 mx:TextInput
 id=name2/
 
 /mx:FormItem
 
 /mx:Form
 
 /mx:Application
 
  
 
  
 
 RequiredFieldValidator.as
 
 
 
 class RequiredFieldValidator extends mx.validators.Validator {
 
 public var numLength:Number;
 
 
 
 public function RequiredFieldValidator(){
 
 
 
 }
 
 public function doValidation(fieldString) : Void{
 
  
 RequiredFieldValidator.validateValue(this, fieldString, null,
 numLength);
 
 }
 
 public static function
 validateValue(validator:mx.validators.Validator, fieldString:String,
 subField, numLength) : Boolean{
 
 var tempValue = new String(fieldString);
 
 
 
 if(tempValue.length  numLength){
 
  
 validator.validationError(TooLong, You entered  + tempValue.length +
  characters. The limit is  + numLength, subField);
 
 return false;
 
 }
 
 return true;
 
 }
 
 }
 
  
 
  
 
 regards,
 
 peter
 
  
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of KOMON Kazuya
 Sent: Wednesday, February 22, 2006 1:40 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Validatior's binding problem?
 
  
 
 Hi, Matt
 
 Thank you for your reply.
 
 I watched the source which generated, it became undefined in case of
 binding.
 That was a reason.
 
 Thank you,
 KAZUYA KOMON
 
 -Original Message-
 Sorry, Validators in 1.5 can't accept binding, they're special
 components.  We changed that in 2.0.  
 
 Matt
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of KAZUYA KOMON
 Sent: Monday, February 20, 2006 12:05 AM
 To: flexcoders@yahoogroups.com
 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 
 
 
 
 
 SPONSORED LINKS 
 
 Web site design development
 http://groups.yahoo.com/gads?t=msk=Web

[flexcoders] Validatior's binding problem?

2006-02-20 Thread KAZUYA KOMON
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

* 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/
 




[flexcoders] Recommended testing tool ? /Flex1.5

2006-02-06 Thread Kazuya Komon

Hi all,


Anyone have any ideas what to use testing tool ?

I trid to use QTP whick Mercury provided.
But I found it could not. Following is reason.

 1) It cannot recognize individual object in Flash.
 2) It cannot synchronize with application speed, positions of 
components and so on when it plays.

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

* 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/
 




Re: [flexcoders] Recommended testing tool ? /Flex1.5

2006-02-06 Thread KAZUYA KOMON

Sorry, I have sent two emails by mistake.


Best Regards,
KAZUYA KOMON


- Original Message -
From : KOMON Kazuya [EMAIL PROTECTED]
To : flexcoders@yahoogroups.com
Sent : Mon, 06 Feb 2006 14:36:05 +0900
Subject : [flexcoders] Recommended testing tool ? /Flex1.5

Hi all,


Anyone have any ideas what to use testing tool ?

I trid to use QTP whick Mercury provided.
But I found it could not. Following is reason.

1) It cannot recognize individual object in Flash.
2) It cannot synchronize with application speed, positions of components and so 
on when it plays.

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

* 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/