flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pol2095 <pol2...@free.fr>
Subject Re: mxml and variables priority
Date Wed, 25 Feb 2015 17:13:43 GMT
*this code work but it's rigth*

<s:MyComponents xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<fx:Script>
<! [CDATA[
public var var1:String;
private var _var2:String;
private var init:Boolean;
public function set var2(value:String):void {
  if(init) {
    if(value == var1) trace(&quot;it work&quot;);
      else  trace(&quot;it doens'twork&quot;);
  }
    else _var2 = value;
}
override protected function commitProperties():void { 
  super.commitProperties(); 
  if(!init) {
    init = true;
    var2 = _var2;
  }
}
]]>
</fx:Script>
</s:MyComponents>



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/mxml-and-variables-priority-tp9666p9682.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Mime
View raw message