Santhosh Nayak
Santhosh Nayak

Reputation: 2288

Flex 4- warning: -3608:

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

Answers (2)

Constantiner
Constantiner

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

duedl0r
duedl0r

Reputation: 9424

use this instead:

FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration('TitledBorderBox')

Upvotes: 3

Related Questions