Reputation: 2288
I have copied code from Adobe Tour de Flex(Other components=>containers=>TitledBorderBox)
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("TitledBorderBox");
but I'm getting a warning in TitledBorderBox.as:
warning: -3608: 'getStyleDeclaration' has been deprecated since 4.0. Please use 'IStyleManager2.getStyleDeclaration on a style manager instance'.
how to remove this warning? please help me.
Upvotes: 1
Views: 1205
Reputation: 14221
Use the following:
var style:CSSStyleDeclaration = styleManager.getStyleDeclaration("TitledBorderBox");
Since Flex 4 every UIComponent
instance has corresponding field.
Or you can switch your project to use Flex 3 SDK.
Upvotes: 1
Reputation: 9424
use this instead:
FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration('TitledBorderBox')
Upvotes: 3