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

Reply via email to