If I use a SWFLoader to load two sub-applications in child application 
domains (loadForCompatibility=false), and if each sub-application 
defines a type of the same name, "Thing", then it doesn't seem possible 
to use the type Vector.<Thing> in both sub-applications. (The Thing type 
is *not* known to the parent application.)

The first sub-application can declare a Vector.<Thing> and add Thing 
objects to it, but if the second sub-app tries to do the same, a type 
error is thrown.

Is this a known limitation of Vector/sub-applications? Are there any 
known workarounds?

There's some code that demonstrates the problem attached to 
https://bugs.adobe.com/jira/browse/FP-1986. Here's an example of the 
stack trace I get:

TypeError: Error #1034: Type Coercion failed: cannot convert 
th...@3786461 to Thing.
        at Vector$object/http://adobe.com/AS3/2006/builtin::push()
        at 
VectorBugSubapp/onCreationComplete()[C:\workspace\x\VectorBugSubapp\src\VectorBugSubapp.mxml:9]
        at 
VectorBugSubapp/___VectorBugSubapp_Application1_creationComplete()[C:\workspace\x\VectorBugSubapp\src\VectorBugSubapp.mxml:2]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at 
mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298]
        at mx.core::UIComponent/set 
initialized()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169]
        at 
mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718]
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at 
mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628]
        at 
mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568]

Reply via email to