Does anyone know how to passing a data between two different modules. 
As long as I tried..a module can't read an ID from another module and that 
makes me stuck...

any solution ?




________________________________
From: Ian Thomas <i...@eirias.net>
To: flexcoders@yahoogroups.com
Sent: Wednesday, August 12, 2009 3:54:26 PM
Subject: Re: [flexcoders] Strange type-coercion error message! Ideas?

  
Looks like your objects belong to different ApplicationDomains.

By which I mean - object 1 is created from a class called
Tools.dal.dataObjec ts.dataInvestmen tAllocation defined by module 1,
and object 2 is created from a class called
Tools.dal.dataObjec ts.dataInvestmen tAllocation defined by module 2.

As far as Flex knows, they are _different classes_, because they are
defined in different ApplicationDomains.

To fix this, make sure your module loading code passes
ApplicationDomain. currentDomain, so the modules all share the same
definition space.

Hope that helps,
Ian

On Wed, Aug 12, 2009 at 9:49 AM, nwebb<neilw...@gmail. com> wrote:
>
>
> TypeError: Error #1034: Type Coercion failed: cannot convert
> Tools.dal.dataObjec ts::dataInvestme ntAllocation@ 2d28301 to
> Tools.dal.dataObjec ts.dataInvestmen tAllocation.
>
> This one has me a little stumped!
>
> The client's project is modular, and has a 'global' array of data objects.
> They access them a bit like this:
> var dataIA:dataInvestme ntAllocation =
> Application. application. _dataCollection. DataObjectGet( "investmentAlloc 
> ation");
>
> Every other object works in the same way without issues. In fact I'm
> fetching two data objects without issues directly before this.  The object
> I'm getting is in the array of objects, is of type dataInvestmentAlloc ation
> (excuse the casing!) and there is only one in the array, yet the error
> message seems to append an instance id to the type (?!).
>
> The only difference I can see is that with this object, it was created and
> added to the collection in the previous module (but as I said, it's there in
> the array, and it's put there way before I try to access it in the next
> module)
>
> Can anyone shed any light on this?
>
>
>
>
>
>
> 

   


      

Reply via email to