Bind Setter using setter method : BindingUtils « Data Model « Flex






Bind Setter using setter method

Bind Setter using setter method
           
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  <mx:Script>
    
    import mx.binding.utils.*;
    import mx.events.FlexEvent;
    public function updateMyString(val:String):void {
      myTA.text = val.toUpperCase();
    }
    public function mySetterBinding(event:FlexEvent):void {
      var watcherSetter:ChangeWatcher = BindingUtils.bindSetter(updateMyString, myTI, "text");
    }
  </mx:Script>
  <mx:TextInput id="myTI" text="Hello Setter" />
  <mx:TextArea id="myTA" initialize="mySetterBinding(event);" />
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Use BindingUtils to bind propertyUse BindingUtils to bind property
2.Data Binding Through the ActionScript BindingUtils ClassData Binding Through the ActionScript BindingUtils Class
3.Bind with BindingUtils.bindSetterBind with BindingUtils.bindSetter
4.Bind Model with BindingUtils.bindPropertyBind Model with BindingUtils.bindProperty