----- Original Message ----- From: "Rafael Faria" <[EMAIL PROTECTED]> To: <flexcoders@yahoogroups.com> Sent: Thursday, September 25, 2008 2:46 AM Subject: [flexcoders] Binding programmatically
> Hi folks > > I have a big question. > > for instance, if i have > > <mx:TextInput text="" id="myLabel" /> > > <mx:Button enabled="{myLabel.text != ''}" label="submit" /> > > > this would mean that if myLabel equals "" my button wil be disabled. > > What comes to my question. > > What if myLabel was added programmatically. I mean, what if i create > that as myLabel = new Label() but inside a class, so on the mxml side > i cant really know what is the instance "myLabel". > > This is a simple example, but what i have is a lot of TextInput > created dynamically and i need to bind some of them to some buttons. > > how one would do that? <mx:Button enabled="{classInstanceName.dynamicLabelName.text != ''}" label="submit" />