no, I 'm saying my comboBox displays whats in its data part of its array 
collection, not its label, when it receives a new batch of data. Your checkbox 
appears to do the same thing.



--- In [email protected], "Anthony DeBonis" <anth...@...> wrote:
>
> Are you talking about an example like this?
> You may be better off creating a reusable/testable component in separate AS 
> or MXML file.
> 
> <mx:Component>
>       <mx:CheckBox creationComplete="init()">
>               <mx:Script>
>                                                               <![CDATA[
>  
>                                                                       private 
> var _data:Object;                                                             
>           private function init():void {                                      
>                                           
> this.addEventListener(MouseEvent.CLICK, update);
>                                                                       }       
>                                                                 override 
> public function get data():Object {
>                                                                               
> return _data; 
>                                                                       }
>  
>                                                                       
> [Bindable]
>                                                                       
> override public function set data(o:Object):void {
>                                                                               
> _data = o;
>                                                                               
> if(_data.checked == "true") this.selected = true;
>                                                                               
> else this.selected = false;
>                                                                       }
>  
>                                                                       private 
> function update(event:MouseEvent):void {
>                                                                               
> if(this.selected) _data.checked = "true";
>                                                                               
> else _data.checked = "false";
>                                                                       }
>  
>  
>                                                               ]]>
>       </mx:Script>
>     </mx:CheckBox>
> </mx:Component>
>


Reply via email to