Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Adobe Flex SDK 4.1 (Release)
-
None
-
None
-
Affected OS(s): All OS Platforms
Language Found: English
Description
Steps to reproduce:
1. Run the attached Flex4Test.mxml application.
The Flex4Test application loads a rutime style sheet (flex4TestStyle.swf) upon initialization and loads Flex4TestScreen.swf using a ModuleLoader upon creationComplete. It always contains a reference to Flex4TestUtil which has a declaration of Flex4TestScreen.
Actual Results:
The following exception is thrown:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.styles::StyleProtoChain$/initProtoChainForUIComponentStyleName()
at mx.styles::StyleProtoChain$/initProtoChain()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::initProtoChain()
at mx.core::UIComponent/regenerateStyleCache()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addingChild()
at mx.core::UIComponent/addChild()
at mx.controls::ComboBase/createChildren()
at mx.core::UIComponent/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/addChildAt()
at mx.core::Container/addChild()
at mx.core::Container/createComponentFromDescriptor()
at mx.core::Container/createComponentsFromDescriptors()
at mx.core::Container/createChildren()
at mx.core::UIComponent/initialize()
at mx.core::Container/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/addChildAt()
at mx.core::Container/addChild()
at mx.core::Container/createComponentFromDescriptor()
at mx.core::Container/createComponentsFromDescriptors()
at mx.core::Container/createChildren()
at mx.core::UIComponent/initialize()
at mx.core::Container/initialize()
at Flex4TestKeyValueScreen/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/addChildAt()
at mx.core::Container/addChild()
Expected Results:
The Flex4TestScreen module should load and display a comobobox.
Workaround (if any):
Changing the declaration in the Flex4TestUtil class as follows seems to fix the issue:
Old:
public var flex4TestScreen:Flex4TestScreen = null;
New:
public var flex4TestScreen:Module = null;
The issue with the StyleProtoChain occurs if you use the actual class name of the module instead of the more generic Module declaration.