I found a solution for this problem in another thread I posted. For
anyone who comes across something similar, Alex Harui pointed me to
the answer on his blog about modules: http://blogs.adobe.com/aharui

My problem was certain objects were being instantiated by one child
app, and then the other child apps wouldn't have access to that
object. The solution is to create those objects that the apps will
share in the parent application.

What confused me is that some of the built-in components/object behave
this way, in that the first app to need the object will create it for
all of the other apps (parent, siblings, and children) to use. In my
case, when a child instantiated said object, the other children didn't
have access to use it.

Tyler


--- In flexcoders@yahoogroups.com, "tyriker" <[EMAIL PROTECTED]> wrote:
>
> I've built an application to display a dataset in a chart. The app
> receives XML via an HTTPService on load, and displays the chart just
> fine. So far so good.
> 
> Step two, I made a second app, and using the SWFLoader object, have
> loaded the first app into 4 separate quadrants (so there's 4 instances
> of the original app running inside the second app). If it matters, I
> didn't embed the apps, but they are loaded at runtime.
> 
> When running this second app, about 95% of the time, I get a runtime
> error and none of the charts show up. Once, I've had 1 chart show up,
> and the other three not. And the other 5% of the time, all four will
> load without error. To take out any other variables, I've used the
> same dataset for all the charts, and the same dataset for all my
> testing. The error that comes up is as follows:
> 
> 
> ------------------
> TypeError: Error #1034: Type Coercion failed: cannot convert
> mx.core::[EMAIL PROTECTED] to mx.core.IFactory.
>       at mx.charts.series::BarSeries/get legendData()
>       at mx.charts.chartClasses::ChartBase/get legendData()
>       at mx.charts::Legend/::populateFromArray()
>       at mx.charts::Legend/mx.charts:Legend::commitProperties()
>       at
>
mx.core::UIComponent/validateProperties()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:5300]
>       at
>
mx.managers::LayoutManager/mx.managers:LayoutManager::validateProperties()[C:\dev\flex_201_gmc\sdk\frameworks\mx\managers\LayoutManager.as:517]
>       at
>
mx.managers::LayoutManager/mx.managers:LayoutManager::doPhasedInstantiation()[C:\dev\flex_201_gmc\sdk\frameworks\mx\managers\LayoutManager.as:667]
>       at Function/http://adobe.com/AS3/2006/builtin::apply()
>       at
>
mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher2()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:7909]
>       at
>
mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:7852]
> ------------------
> 
> 
> I've dug through the app with the debugger (Flex Builder 2) and
> haven't come up with anything yet. To me, it looks like the problem is
> occurring in a piece of code I don't have control over. And why it may
> work 5% of the time, and in the next exact run give a runtime error
> has me puzzled. It must be a timing thing, but I'm lost as to where to
> even look.
> 
> Am I missing something here? Does anyone have any advice for me? I can
> provide more details if needed.
> 
> Thanks everyone.
>


Reply via email to