BindingUtils.bindProperty(ti, "text", sourceObject, "sourceProperty");

-Josh

On Thu, Sep 25, 2008 at 12:15 PM, Paul Andrews <[EMAIL PROTECTED]> wrote:

> ----- Original Message -----
> From: "Rafael Faria" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Thursday, September 25, 2008 3:06 AM
> Subject: [flexcoders] Re: Binding programmatically
>
>
> > Paul,
> >
> > thanks for your message but i might not explain it right.
> >
> > i will have something like this inside my class
> >
> > var el:Array = new Array('label1','label2','label3');
> >
> > for(var i:uint = 0;i<el.length;i++)
> > {
> > var ti:TextInput = new TextInput();
> > ti.id = el[i];
> > addChild(ti);
> > }
> >
> > so i cant do what u suggested because "ti" is just a generic variable
> > to create the elements.
> >
> > any other idea?
>
> Yes, write a function:
>
> function allNonBlank():Boolean {
> for (var i:uint=0; i< this.numChildren; i++) {
> if (this.getChildAt(i).text != "") return false;
> }
> return true;
> }
>
>
> Then
> <mx:Button enabled="{allNonBlank()}"   label="submit" />
>
> Haven't tested it - something like that.
>
> Paul
>
> > raf
>
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Alternative FAQ location:
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> Links
>
>
>
>


-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

http://flex.joshmcdonald.info/

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]

Reply via email to