Don't know why it doesn't fail in that case, but it could be timing of some sort. The exception you got may always be from Module1 or 2 so then it would work depending on the order of loading.
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tchredeemed Sent: Monday, August 25, 2008 6:20 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: question about AMF I am following ya. One thing though, how come if I load Module 1 before Module 2, I find no problems. I guess Flex is just magical like that! :) --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > 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:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of tchredeemed > Sent: Friday, August 22, 2008 12:26 PM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.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> <mailto:flexcoders%40yahoogroups.com> > , Maciek Sakrejda <msakrejda@> wrote: > > > > http://www.google.com/search?q=alex+harui+blog <http://www.google.com/search?q=alex+harui+blog> > <http://www.google.com/search?q=alex+harui+blog <http://www.google.com/search?q=alex+harui+blog> > > > > > > > -----Original Message----- > > From: tchredeemed <apthorp@> > > Reply-To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.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> > <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%40yahoogroups.com> > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.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> <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? > > > > > >