incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Left Right <olegsivo...@gmail.com>
Subject Re: Framework: what do I need to do to initialize styles
Date Wed, 11 Apr 2012 20:39:34 GMT
> 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? It does too many things you could call
"register".

Below are things that "register" something:
registerInheritingStyle
registerSizeInvalidatingStyle
registerParentSizeInvalidatingStyle
registerParentDisplayListInvalidatingStyle
registerColorName

and things related to loading (and possibly registering)

loadStyleDeclarations
loadStyleDeclarations2

However, of the register* functions none does anything important - they
could be easily combined into one function that simply puts a style name
into hash - they don't do anything beyond that. I think I tried calling all
of them with arguments I could imagine they might take.

load* functions seem to be related to the situation when style declarations
are loaded from elsewhere. I hoped they would help, but they outsource all
real work elsewhere, and then from that elsewhere it goes elsewhere else
few times, and it ends nowhere (? I can't find what they actually do).

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).

> component look up
What do you mean when you say "look up"?... can you be more specific? The
area of source code related to styles is extremely lengthy and lacking
direction there are too many classes involved, and, unfortunately,
components themselves play a very minor role in the process... When
component gets the style through getStyle() they finds some of it, but,
possibly, not all of it, they only find _skin_ if I set it by hand,
otherwise they dont, but I can't set skins to all part of the component.

This is roughly what happens:

component.setStyle("skinClass", someClass);
component.getStyle("skinClass"); // undefined

Now, I can make a particular component find it's skin by calling
component.styleChanged("skinClass"); but this doesn't help child components
find their skins. I.e. there's a label in the button - so while the button
finds it's styles, the label doesn't (and I can't call styleChanged on it).

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message