It is essentailly the same problem. Each module has a definition but only one can be translated via AMF and if it is the wrong one you have trouble. So you have to use the same techniques to only have one definition of any class used by AMF
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tchredeemed Sent: Friday, August 22, 2008 12:26 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: question about AMF Alex, after looking through the ppt, I do not know if this is the same issue. It seems to me the issue you pointed me to is when the two modules want to share a portion of code. I.E. a singleton enforced class. My problem seems to be different, I am actually trying to instantiate code that has no relation between the separate modules. I am not sure if that would cause the problem or not... I don't understand why it would give me this error, when I am basically saying the same thing as if I were to say for each( var s:String in event.result ) after all DataVO is just an abstract data type.. right? --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , Maciek Sakrejda <[EMAIL PROTECTED]> wrote: > > http://www.google.com/search?q=alex+harui+blog <http://www.google.com/search?q=alex+harui+blog> > > > -----Original Message----- > From: tchredeemed <[EMAIL PROTECTED]> > Reply-To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Re: question about AMF > Date: Fri, 22 Aug 2008 17:57:47 -0000 > > Where is your blog at? > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <aharui@> wrote: > > > > Shared code problem. See modules presentation on my blog for more > > details. > > > > > > > > ________________________________ > > > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] > On > > Behalf Of tchredeemed > > Sent: Friday, August 22, 2008 9:47 AM > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] question about AMF > > > > > > > > I have a VO called DataVO. > > > > I have two modules that call an AMF service, which returns an array of > > VO's. > > > > Every once in a while, I get the error: > > TypeError: Error #1034: Type Coercion failed: cannot convert > > com.gh.vo::[EMAIL PROTECTED] to com.gh.vo.DataVO. > > > > However, I can only get the compiler to throw this error in 1 > situation: > > > > I start the app, load Module 2, than Module 1, than go back to Module > > 2. After I arrive back at Module 2, it throws the error on the > > resultHandler of the RemoveObject service, in code that looks like > this: > > > > private function resultHandler( event:ResultEvent ):void { > > var hash:Array = new Array(); > > for each( var data:DataVO in event.result ){ > > hash.push(data); > > } > > dataAC = new ArrayCollection( hash ); > > } > > > > It breaks on the for each() line. > > Any ideas? > > >