I would like to bind a non-boolean value to a CheckBox?  I can't  
figure out the right way to do this.

I would like to create a custom CheckBox that can accept a string  
value as a property.  For example, if my model returns the string  
"apple" then

<util:MyCustomCheckBox value="apple" fldValue="{model.myCustom.fld}" />

In my extended CheckBox code it looks at that fld and then decides  
whether to select the CheckBox or not.

private function getBooleanValue():void{
        if(value != fldValue){
                selected = false;
        }else{
                selected = true;
        }
}

My problem is with the binding.  I can't seem to set it up properly  
so that when the fldValue property changes, the function will get  
called thus changing the selected property. I also tried to create a  
getter function "_booleanValue" and bind the selected property to  
that, but I ran into problems trying to bind getter functions.

The whole binding thing makes my head spin so hopefully this is  
simple fix...

Thanks, Kevin

Reply via email to