Open GoogleCodeExporter opened 8 years ago
I'm inclined to think this is simply the way modules work rather than anything
specific to the WindowShade. In a normal app, the initialization of styles is
something that happens before the screen renders the first time, I suppose.
When you
load a module with classes that aren't included in the main app, that all has to
happen on-the-fly for those classes.
Is there a reason you can't statically link the WindowShade in your main app,
like
your commented code does?
Original comment by xslf...@gmail.com
on 17 Mar 2008 at 3:13
I am now linking to WindowShade statically in my main app but I think this is a
workaround.
Generally there would be no need that my main app knows WindowShade or perhaps
other UI components. The
workaround is of course pretty simple but I doubt this should be the normal
way. I am not sure but I did not link
many other components not within my main app and I am not facing the problem
described for the
WindowShade.
Original comment by soenke.r...@gmail.com
on 25 Mar 2008 at 10:07
The "static constructor" in WindowShade gets called, in my code, when the first
instance of a WindowShade object is created. Since this is only when that part
of
the UI is used it means I get a nasty flash in my entire UI when the user
displays
the WindowShade.
Also, using the StyleManager.setStyle method is resource intensive and means
everything updates its style.
I wonder if you could achieve the same effect by overriding getStyle in
WindowShade
and either getting the style property value through the StyleManager, if the
style
exists, or getting the default value from WindowShade's static fields. That
way you
would not need to update the styles through the StyleManager at all.
Something like:
override public function getStyle(styleProp:String):*
{
var css:CSSStyleDeclaration = StyleManager.getStyleDeclaration("WindowShade");
if (css != null && StyleManager.isValidStyleValue(css.getStyle(styleProp)))
{
return css.getStyle(styleProp)
}
else
{
return styleDefaults[styleProp];
}
}
Original comment by Richa...@i2.co.uk
on 4 Jun 2008 at 11:08
Original comment by dmcc...@gmail.com
on 8 Jan 2009 at 4:50
Original issue reported on code.google.com by
soenke.r...@gmail.com
on 10 Mar 2008 at 1:41Attachments: