and for measure() it only talks about the component itself so would it be better to set a button(Child of the component) in the measure or just do it in the createChildren();
----- Original Message ---- From: rueter007 <[EMAIL PROTECTED]> To: [email protected] Sent: Wednesday, February 6, 2008 5:57:18 PM Subject: [flexcoders] Re: is this how to use commitProperties you definitely can. but if there are several properties and each of them call invalidateDisplayLi st(), it could be a slight performance problem as you are redrawing for every change. Instead if you do it in the commitProperties, you call it once for all the changes. - venkat http://www.venkatj. com --- In [EMAIL PROTECTED] ups.com, Sherif Abdou <[EMAIL PROTECTED] ..> wrote: > > so why not just call invalidateDisplayLi st() on the setter itself. Thanks > /** > * 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{ > if(_closePolicy !=value){ > trace(value) ; > _closePolicy= value; > _closePolicyChanged =true; > invalidatePropertie s(); > dispatchEvent( new Event("closePolicyC hanged")) ; > } > } > [Bindable(event= "closePolicyChan ged")] > 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.commitPropert ies(); > if(_closePolicyChan ged){ > closeButton. visible=true; > invalidateDisplayLi st(); > _closePolicyChanged =false; > } > } > > > > ----- Original Message ---- > From: ben.clinkinbeard <ben.clinkinbeard@ ...> > To: [EMAIL PROTECTED] ups.com > Sent: Wednesday, February 6, 2008 2:42:41 PM > Subject: [flexcoders] Re: is this how to use commitProperties > Looks right to me except you should validate that the new value is > actually different than the existing value in your setter before > setting the flag and whatnot. > > HTH, > Ben > > --- In [EMAIL PROTECTED] ups.com, Sherif Abdou <sherif626@ ..> wrote: > > > > my bad, i for some reason sent it to flexComponents instead instead > of flexcoders so sorry for double post > > 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.invalidateProp erties(); > > dispatchEvent( new Event("closePolicyC hanged")) ; > > } > > [Bindable(event= "closePolicyChan ged")] > > 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.commitPropert ies(); > > if(_closePolicyChan ged){ > > invalidateDisplayLi st(); > > _closePolicyChanged =false; > > } > > } > > > > > > > ____________ _________ _________ _________ _________ _________ _ > > Be a better friend, newshound, and > > know-it-all with Yahoo! Mobile. Try it now. > http://mobile. yahoo.com/ ;_ylt=Ahu06i62sR 8HDtDypao8Wcj9tA cJ > > > > > > > > ____________ _________ _________ _________ _________ _________ _ > Looking for last minute shopping deals? > Find them fast with Yahoo! Search. http://tools. search.yahoo. com/newsearch/ category. php?category= shopping > ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs

