- Are those 2 calls really necessary/useful?

I wouldn't trust anyones answer on this except the framework engineers. :)

I would say, if you find there is a lot of processing happening in your
styleChanged() method, regardless of the null being passed two times, create
a flag and invalidateProperties(). Then in that call do your processing.

Although this might happen on the same queue, I haven't tested it. If so, it
still might be a good idea, could you give an example of what you normally
do in styleChanged(). It's for repainting, setting styleName's etc.


In my experience with the Flash 9 Player, you are going to have to do a lot
of sloppy coding before you will hit the players performance.

Peace, Mike

On 05 Mar 2007 19:23:49 -0800, Muzak <[EMAIL PROTECTED]> wrote:

  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]<teoti.graphix%40gmail.com>
>
To: <[email protected] <flexcomponents%40yahoogroups.com>>
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
>




--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to