These are the kinds of problems that result from the shared code problem The Flash Player can't handle multiple mappings of "different" classes for deserialization. Don't try to fight it, either put the VO's in the main app or create a shared code module.
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 8:01 AM To: [email protected] Subject: [flexcoders] Re: Type Cast Error Alex - after tracing this through, the first time into the page, I do a request to get the stock objects. They are retrieved properly and displayed. I go into a chart module, get some other items and display that page. When I go back into the 1st page (or module) it looks as though the object is not getting serialized properly. I have a BackTestStock object with a BackTest Object and Stock object in it. The BackTest is ok, but the stock object is null - so it looks like it is not getting serialized properly for whatever reason. The first time it does, but not the second time. Thanks ... --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Essentially, the actuall classname isn't StockVO, it is > [EMAIL PROTECTED] If the portion > after the @ matches it is effectively stripped off so you can just see > and use StockVO in most places > > > > So it doesn't really match. This will be extremely useful in Flex 3.2 > when you can mix sub-application built with different versions of Flex, > but is a pain for module users like yourself. > > > > Of course, the easiest way to use StockVO in both modules is to get it > linked into the main app. Most VOs are small so it won't matter. The > SharedCode Module pattern is for heavy things. > > > > ________________________________ > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of donald_d_hook > Sent: Wednesday, July 30, 2008 5:52 PM > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Re: Type Cast Error > > > > Alex - > > I looked at your presentation. I am using the StockVO in both pages > (both modules). I need to use it in both. If I define the class in > both places, what does it matter, its the same class? > > I saw where you mentioned having common code by loading a "Shared > Code" swf that would apply to ALL modules. I guess I can give that a > shot. > > Thanks again for your time! > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > , "Alex Harui" <aharui@> wrote: > > > > It is picking up the class from a different application domain. See > the > > modules presentation on my blog. > > > > > > > > ________________________________ > > > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > ] On > > Behalf Of donald_d_hook > > Sent: Wednesday, July 30, 2008 10:22 AM > > To: [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] Type Cast Error > > > > > > > > I receive a type cast error when I try to cast an object I received > > from the server (an arraycollection of value objects). I get the > > following: > > > > TypeError: Error #1034: Type Coercion failed: cannot convert > > com.spinnaker.model::[EMAIL PROTECTED] to com.spinnaker.model.StockVO > > > > The actionscript object has the correct remoteClass. On top of that, > > this only happens the 2nd time into the page. Not sure what is > > happening behind the scenes, nor do I know what the @3b392b81 is. > > > > Thanks in advance > > >

