Select to view content in your preferred language

Type Coercion Failed Error of the same Class

743
3
02-25-2011 08:49 AM
DeonaEvans
Emerging Contributor
Has anyone ever received this error:
TypeError:  Error #1034:  Type Coercion failed.....

The error goes on to list the two classes that it cannot convert between and they're the same class.  I've read that this has something to do with the swf loader and the application domain.  So my question is, how does this plan into the FlexViewer?  There is a message being sent from the main app to another module.  So how do I make sure this doesn't happen?

Any ideas?
Tags (2)
0 Kudos
3 Replies
DasaPaddock
Esri Regular Contributor
0 Kudos
DeonaEvans
Emerging Contributor
That was the fix.  Thanks!
0 Kudos
KyleTraff
Emerging Contributor
My flex viewer 2.2 application currently contains a number of Widgets that are managed by the Widget Manager.

I tried to fix the issue you solved above by loading all widgets into the same application domain as the loader:

    wgtInfo.load(ApplicationDomain.currentDomain, null, null, moduleFactory);

I now get the following error whenever I attempt to load the Helper widget:

> TypeError: Error #1009: Cannot access a property or method of a null object reference.


Am I missing something?  Thanks in advance.
0 Kudos