flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: Framework: what do I need to do to initialize styles
Date Wed, 11 Apr 2012 20:56:28 GMT

On 4/11/12 1:39 PM, "olegsivokon@gmail.com" <olegsivokon@gmail.com> wrote:

>> Registering the CSSStyleDeclaration in a SystemManagerImpl
> I think you meant StyleManagerImpl (style, not system), right? If so, how
> do I tell if it's registered?
A call to getStyleDeclaration will do the right thing.

> So, I'm afraid to conclude none of this functions actually binds the styles
> tree to the display list (this is absolutely a miracle to me - I've no idea
> how it happens today. It used to be simpler in Flex 3).
The basic mechanics haven't changed other than to look up by moduleFactory.
The styles are "registered" not by any of those APIs you mentioned but by
the generated code in XXX_Styles.as

>> component look up
> What do you mean when you say "look up"?
There is a point in the lifecycle of the component where it gets its
moduleFactory assigned and then the styles for the component are computed.
By "look up" I mean that computation of what styles matter by checking its
type vs the available type-selectors, etc.

If you take a simple Flex app, you can break on initProtoChain and see when
it gets called.

Alex Harui
Flex SDK Team
Adobe Systems, Inc.

View raw message