Re: [flexcoders] Re: Binding programmatically

2008-09-24 Thread Josh McDonald
Use the code I posted above with the change listener and the "buttonEnabled()" function. -Josh On Thu, Sep 25, 2008 at 3:14 PM, Rafael Faria <[EMAIL PROTECTED]>wrote: > Now i have another problem. > > What if the enabled depends on the action of 2 different "hosts"? like > i need to check if myL

[flexcoders] Re: Binding programmatically

2008-09-24 Thread Rafael Faria
Now i have another problem. What if the enabled depends on the action of 2 different "hosts"? like i need to check if myLabel1 == '' and myLabel2 == ''. i tried to duplicate the same function twice for the same object but different sources but i dont think that works like this. anyone has any id

[flexcoders] Re: Binding programmatically

2008-09-24 Thread Rafael Faria
private function inputChanged() : void > { > dispatchEvent(new Event("textBoxUpdated")); > } > > > > -Josh > > On Thu, Sep 25, 2008 at 12:47 PM, Paul Andrews <[EMAIL PROTECTED]> wrote: > > > - Original Message ----- > &g

[flexcoders] Re: Binding programmatically

2008-09-24 Thread Rafael Faria
--- In flexcoders@yahoogroups.com, "Josh McDonald" <[EMAIL PROTECTED]> wrote: > > BindingUtils.bindProperty(ti, "text", sourceObject, "sourceProperty"); > How i would add a function to tell what i need to set? like in my example i want to set the sourceObject.enabled according to the content of

Re: [flexcoders] Re: Binding programmatically

2008-09-24 Thread Josh McDonald
EMAIL PROTECTED]> wrote: > - Original Message - > > *From:* Aaron Miller <[EMAIL PROTECTED]> > *To:* flexcoders@yahoogroups.com > *Sent:* Thursday, September 25, 2008 3:45 AM > *Subject:* Re: [flexcoders] Re: Binding programmatically > > But then how would this execute

Re: [flexcoders] Re: Binding programmatically

2008-09-24 Thread Paul Andrews
- Original Message - From: Aaron Miller To: flexcoders@yahoogroups.com Sent: Thursday, September 25, 2008 3:45 AM Subject: Re: [flexcoders] Re: Binding programmatically But then how would this execute the binding when the text is updated? Yes, you're right. Time to get

Re: [flexcoders] Re: Binding programmatically

2008-09-24 Thread Aaron Miller
But then how would this execute the binding when the text is updated? What I would do is use BindingUtils.bindProperty on each TextInput to set up the bindings in Actionscript. Best Regards, ~Aaron On Wed, Sep 24, 2008 at 7:15 PM, Paul Andrews <[EMAIL PROTECTED]> wrote: > > > Yes, write a functi

[flexcoders] Re: Binding programmatically

2008-09-24 Thread Rafael Faria
Wow Josh, i think that's exaclty what i need. How i would apply the function to this example? says sourceObject.text != '' how would i do it? im reading the doc but i didnt quit understood how it work. thakns man raf --- In flexcoders@yahoogroups.com, "Josh McDonald" <[EMAIL PROTECTED]> wrot

Re: [flexcoders] Re: Binding programmatically

2008-09-24 Thread Josh McDonald
; 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:A

Re: [flexcoders] Re: Binding programmatically

2008-09-24 Thread Paul Andrews
- Original Message - From: "Rafael Faria" <[EMAIL PROTECTED]> To: 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 some

[flexcoders] Re: Binding programmatically

2008-09-24 Thread Rafael Faria
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 wrote: > > > - Original Message - > From: "Rafael Faria" <[EMAIL PROTECTED]> > To: > Sent: Thursd