Sunday 15 June 2014

flex - How to make a property bindable? -


I have a class like this. The property is based on "ipboard" filed "ecboardid", I have found that when Accced changes, UI controls do not see that "ipag" has also changed. So, how to make this property binding? PUBLIC class encoder EventDispatcher {public worker ecboardid: String; / * -......................................... Methods ..... ..................................... * / public function copyFrom (newEncoder: encoder): zero { Ecboardid = newEncoder.ecboardid; This.dispatchEvent (new event ('isPagChanged')); } [Bindabal (event = "ipt switch")] Public function found ipag (): boolean {if (this.aconbird! = Null) {if (this .onlyboardid.search ('xxx')! = -1) {return False; } Back true; } Other {return false; }}}

Edit:

If I change the property to a static job,

 < Code> [bindable] public class encoder event dispatcher (public worker excibid): string; / * -......................................... Methods ..... ..................................... * / public function copyFrom (newEncoder: encoder): zero { Ecboardid = newEncoder.ecboardid; This.dispatchEvent (new event ('isPagChanged')); } Public static function isPag (string excreb): boolean {if (ecboardid! = Null) {if (ecboardid.search ('xxx') = -1) {return false; } Back true; } Other {return false; }}}  

Tie this way:

  visible = {encoder.ispag (encoder.acbddid)}  

works? Will the encoder see a change in a boobed?

I do not think you can only read properties Bindable, because the Flex changes continue the incidents To call the setter method for a property uses. For the properties of the object, see the section on binding.


No comments:

Post a Comment