Open GoogleCodeExporter opened 9 years ago
I had this problem and i solved it defining and setting the style "windowsShade"
Original comment by lgiu...@gmail.com
on 27 Jun 2011 at 3:59
I had to add a style like this in order to get WindowShades working:
flexlib|WindowShade {
headerClass:ClassReference("mx.controls.Button");
}
Original comment by amigaaba...@gmail.com
on 11 Aug 2011 at 3:25
Just setting the style won't fix the real issue. The problem is that the code
(see snippet below) that initialize the default styles in
WindowShade::constructClass isn't being executed correctly. Adobe changed the
getStyleDeclarations and setStyleDeclarations in 4 so the full package name is
now required. So all the calls to these 2 methods in FLexLib need to be updated
to include the full package.
You must specify package names when using the StyleManager APIs
getStyleDeclarations or setStyleDeclarations This was allowed:
StyleManager.getStyleDeclarations
("TextInput") This is the new syntax:
StyleManager.getStyleDeclarations
("mx.controls.TextInput") Anyone using these StyleManager APIs
private static function constructClass():Boolean {
var css:CSSStyleDeclaration = StyleManager.getStyleDeclaration("WindowShade")
var changed:Boolean = false;
if(!css) {
// If there is no CSS definition for WindowShade,
// then create one and set the default value.
css = new CSSStyleDeclaration();
changed = true;
}
// make sure we have a valid values for each style. If not, set the defaults.
for(var styleProp:String in styleDefaults) {
if(!StyleManager.isValidStyleValue(css.getStyle(styleProp))) {
css.setStyle(styleProp, styleDefaults[styleProp]);
changed = true;
}
}
if(changed) {
StyleManager.setStyleDeclaration("WindowShade", css, true);
}
return true;
}
Original comment by am...@comcast.net
on 15 Sep 2011 at 10:10
Original issue reported on code.google.com by
siddh...@gmail.com
on 25 Apr 2011 at 5:31