I haven't seen this well documented before, but if you're component was using the style manager and is throwing a bunch of warnings in Flex 4, you need to get the "global" style manager now. You probably see this error:
"3608: 'getStyleDeclaration' has been deprecated since 4.0. Please use 'IStyleManager2.getStyleDeclaration on a style manager instance'."
This is really easy to fix, but not extremely well documented. StyleManager is no longer a global singleton, but there is an instance of it running already at the top of your app. Flex 4 has a new static class called FlexGlobals. You can use that to get a reference to the top of your app and then get the instantiated one.
//Flex 3 code
StyleManager.getStyleDeclaration("someStyle");
//Flex 4 code
FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration("someStyle");
출처 : http://www.jonathanrowny.com/journal/migrating-flex-4-stylemanager
'Blog > Flex' 카테고리의 다른 글
Problem with BlendMode.Erase (0) | 2012.05.22 |
---|---|
Flex 4.5.1 안드로이드 App 개발시 파일이름 예외 (0) | 2011.09.07 |
AIR에서 DragManager와 NativeDragManager (0) | 2010.08.08 |
실전 Event Bubble (0) | 2010.07.04 |
CustomEvent에서 event.preventDefault() 기능 구현하기 (0) | 2010.07.04 |