Hi Mike,

Thx for the reply.

Is this documented somewhere?

When I look at: "About overriding the styleChanged() method"
http://livedocs.adobe.com/flex/201/html/skinstyle_149_5.html
it doesn't mention anything about a null value being passed.

So, to rephrase my initial question.
- Are those 2 calls really necessary/useful?
- If not, does making those method calls have any impact on an application as a 
whole?

Meaning, if I have 100 components in an app, that's 200 method calls that do 
nothing.

regards,
Muzak

----- Original Message ----- 
From: "Michael Schmalle" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, March 06, 2007 1:37 AM
Subject: Re: [flexcomponents] styleChanged called twice during initialization 
process


> Hi,
>
>> Is this something we should be worried about, unnecessary method calls?
>
> styleChanges() gets called when component's are initialize and proto chains
> are created.
>
> null is passed when a component resets, just like styleName. It will only
> matter is you have anything that gets rendered with like and
>
> var allStyles:Boolean = (styleProp == null || styleProp == "styleName")
>
> So all you need to do is test and figure out what you want to be recreated
> or painted when the value is null, thus use if() statements.
>
> Also, remember, you have the initialized property to do more granular checks
> during initialization where null is passed twice.
>
> I think these calls are from regenerateStyleCache() or at least one is.
>
> Peace, Mike
>


Reply via email to