No. Don't use commitProperties() to call invalidateDisplayList(). If you
need to ensure that updateDisplayList() gets called, simply call
invaidateDisplayList() in your property setter.
 
There are many overrides of commitProperties() in the framework source
code that you can look at. Typically, commitProperties() is used to push
a property which has been set on a component down into one or more of
the component's children.
 
Gordon Smith
Adobe Flex SDK Team

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Sherif Abdou
Sent: Wednesday, February 06, 2008 11:26 AM
To: [email protected]
Subject: [flexcomponents] is this the right way to use commitProperties



 
<http://geo.yahoo.com/serv?s=97359714/grpId=18235967/grpspId=1705007207/
msgId=3475/stime=1202325136/nc1=4507179/nc2=3848640/nc3=4990213> 


i am just wondering if this is how it usually gets used
/**

* Used to Determine whether or not there was a change in the Close
Policy

*/

private var _closePolicyChanged:Boolean;

/**

* Internal Value for the ClosePolicy so we can react

* accordingly

*/

private var _closePolicy:String;

[Inspectable(defaultValue="close_always",enumeration="close_always ,
close_rollover , close_never, close_selected")]

public function set closePolicy(value:String):void{

_closePolicy=value;

_closePolicyChanged=true;

this.invalidateProperties();

dispatchEvent(new Event("closePolicyChanged"));

}

[Bindable(event="closePolicyChanged")]

public function get closePolicy():String{

return _closePolicy;

}

 
/**

* Create the CommitProperties so we determine if there is a need

* to change the closePolicy Buttons

*/

override protected function commitProperties():void{

super.commitProperties();

if(_closePolicyChanged){

invalidateDisplayList();

_closePolicyChanged=false;

}

}


________________________________

Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
it now.
<http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i6
2sR8HDtDypao8Wcj9tAcJ>  

 

Reply via email to