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 22:15:09 GMT
> XXX_Styles.as
Yes, I copied the code from there and from FlexInit. Combined them and this
code runs before the application starts, just as if SystemManager called
init().

> moduleFactory assigned and then the styles for the component are computed.
As you can see from my code above, I had to do that manually, it doesn't
happen by itself - and that's part of the problem I'm seeing.
What does normally assign moduleFactory to components? (I've tried to
override the setter in UIComponent, but it is never called, not even in a
functioning application).
moduleFactory is automatically set on styleManager in the construction and
it's value is the systemManager.
moduleFactory is set on the "Application" class from systemManager before
it is added to stage, the value is, again, the systemManager.

I added:

styleManager.initProtoChainRoots();
styleManager.initProtoChainRoots();
styleManager.getStyleDeclarations("global");
styleManager.getStyleDeclaration("spark.components.supportClasses.TextBase");
styleManager.getStyleDeclaration("spark.components.supportClasses.SkinnableComponent");
styleManager.getStyleDeclaration("spark.components.Button.emphasized");
styleManager.getStyleDeclaration("spark.components.Button");

Or should it be added before the initProtoChainRoots?

I.e. I've added it, but nothing changed. From the look of this function it
doesn't do what I'm after, it seem to be populating the styles tree - but
this has no effect on how components find their styles later...
I've also tried getStyleDeclarations (with "s") - same effect. Something
else doesn't happen.

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