[flexcoders] Re: Type Cast Error
Alex - looks like the shared code modules worked. I had an error in the module, although Flex Builder did not display any errors, getting out, coming back in doing a clean revealed the code problem. Now it looks like it works!! Thanks again for you help!!! Sorry for the multiple responses, but the thread was not being refreshed so I thought the replies were not getting logged - which is why so saw several of them. Thanks!!! --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: The import doesn't actually cause anything to be linked in, it just specifies the full path to whatever package StockVO is in, so you'll need the import statement, but if you follow the recipe for modules, you'll not link StockVO into your modules because it will be in some other link-report, either the mainapps or the sharedcode module From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error So no need to have an import in the module? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: There's an Under the hood: Application Domain slide in the presentation. It tries to show you that once you get StockVO in the main apps' AppDom, all modules will use that definition and won't use or need their own in the module. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:58 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Type Cast Error In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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 flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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
[flexcoders] Re: Type Cast Error
Alex - So I should define the class in one spot - i.e. the shared code mxml, then use some getters defined in the main app to use that instance or definition in the module. Thanks again for your assistance!! --- In flexcoders@yahoogroups.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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.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 flexcoders@yahoogroups.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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.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
[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 flexcoders@yahoogroups.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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.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 flexcoders@yahoogroups.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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.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
RE: [flexcoders] Re: Type Cast Error
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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 8:01 AM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com 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
RE: [flexcoders] Re: Type Cast Error
The shared code module won't require any getters. It is effective an RSL that goes in the main app so all modules can use it w/o any changes. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:37 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error Alex - So I should define the class in one spot - i.e. the shared code mxml, then use some getters defined in the main app to use that instance or definition in the module. Thanks again for your assistance!! --- In flexcoders@yahoogroups.com 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com 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
[flexcoders] Re: Type Cast Error
OK - I will give it a shot. I have been fighting it for several weeks, so I appreciate your insight. So just define the VO's in the shared code module, load on startup, then have an import of the object (VO) in the module so I can do some operations on it - i.e. - get it from the main module and manipulate as needed... Sound correct? Thanks again. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: 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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 8:01 AM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com 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
[flexcoders] Re: Type Cast Error
In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.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 flexcoders@yahoogroups.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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.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
RE: [flexcoders] Re: Type Cast Error
There's an Under the hood: Application Domain slide in the presentation. It tries to show you that once you get StockVO in the main apps' AppDom, all modules will use that definition and won't use or need their own in the module. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.com 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com 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
RE: [flexcoders] Re: Type Cast Error
The shared code module must be loaded before the other modules. You don't have to get it from the main module, it will simply be there ready for use. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 3:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error OK - I will give it a shot. I have been fighting it for several weeks, so I appreciate your insight. So just define the VO's in the shared code module, load on startup, then have an import of the object (VO) in the module so I can do some operations on it - i.e. - get it from the main module and manipulate as needed... Sound correct? Thanks again. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 8:01 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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 flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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 flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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
[flexcoders] Re: Type Cast Error
So just have the imports and define variables in the shared code, then keep the imports and object definitions in the modules... Thanks --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: The shared code module must be loaded before the other modules. You don't have to get it from the main module, it will simply be there ready for use. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 3:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error OK - I will give it a shot. I have been fighting it for several weeks, so I appreciate your insight. So just define the VO's in the shared code module, load on startup, then have an import of the object (VO) in the module so I can do some operations on it - i.e. - get it from the main module and manipulate as needed... Sound correct? Thanks again. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 8:01 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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 flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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 flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Type Cast Error I
[flexcoders] Re: Type Cast Error
So no need to have an import in the module? --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: There's an Under the hood: Application Domain slide in the presentation. It tries to show you that once you get StockVO in the main apps' AppDom, all modules will use that definition and won't use or need their own in the module. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com 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
RE: [flexcoders] Re: Type Cast Error
The import doesn't actually cause anything to be linked in, it just specifies the full path to whatever package StockVO is in, so you'll need the import statement, but if you follow the recipe for modules, you'll not link StockVO into your modules because it will be in some other link-report, either the mainapps or the sharedcode module From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error So no need to have an import in the module? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: There's an Under the hood: Application Domain slide in the presentation. It tries to show you that once you get StockVO in the main apps' AppDom, all modules will use that definition and won't use or need their own in the module. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:58 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Type Cast Error In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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 flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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
[flexcoders] Re: Type Cast Error
OK - I changed one module by removing the imports - now the module doesnt load and I dont see any compile errors. --- In flexcoders@yahoogroups.com, donald_d_hook [EMAIL PROTECTED] wrote: So no need to have an import in the module? --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: There's an Under the hood: Application Domain slide in the presentation. It tries to show you that once you get StockVO in the main apps' AppDom, all modules will use that definition and won't use or need their own in the module. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com 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
[flexcoders] Re: Type Cast Error
OK - I changed one module by removing the imports - now the module doesnt load and I dont see any compile errors. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: There's an Under the hood: Application Domain slide in the presentation. It tries to show you that once you get StockVO in the main apps' AppDom, all modules will use that definition and won't use or need their own in the module. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com 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
[flexcoders] Re: Type Cast Error
OK - I changed one module by removing the imports - now the module doesnt load and I dont see any compile errors. --- In flexcoders@yahoogroups.com, donald_d_hook [EMAIL PROTECTED] wrote: So no need to have an import in the module? --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: There's an Under the hood: Application Domain slide in the presentation. It tries to show you that once you get StockVO in the main apps' AppDom, all modules will use that definition and won't use or need their own in the module. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com 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
[flexcoders] Re: Type Cast Error
OK - I changed one module by removing the imports - now the module doesnt load and I dont see any compile errors. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: There's an Under the hood: Application Domain slide in the presentation. It tries to show you that once you get StockVO in the main apps' AppDom, all modules will use that definition and won't use or need their own in the module. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com 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
[flexcoders] Re: Type Cast Error
OK, I removed the imports from one module to see the results. Now the module does not display even though there are no compile errors. I guess there is something wrong with the module since the main app isnt loading it - i.e. the module loader is null in the main app. The other modules work fine. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: There's an Under the hood: Application Domain slide in the presentation. It tries to show you that once you get StockVO in the main apps' AppDom, all modules will use that definition and won't use or need their own in the module. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com 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
[flexcoders] Re: Type Cast Error
Ok - removing the imports, there are no compile errors, but when I run the app, the module does not display indicating that there is a problem. There are not compile errors, but in the main app, the module loader is null for the module I tested with. So now I need to figure out why that doesnt display. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: There's an Under the hood: Application Domain slide in the presentation. It tries to show you that once you get StockVO in the main apps' AppDom, all modules will use that definition and won't use or need their own in the module. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com 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 flexcoders@yahoogroups.com 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com 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
RE: [flexcoders] Re: Type Cast Error
You will probably need import statements, I explained why in an earlier response. I'm not going to respond to this thread so we don't have two threads going. Please respond to my post just before this one. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 7:16 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type Cast Error Ok - removing the imports, there are no compile errors, but when I run the app, the module does not display indicating that there is a problem. There are not compile errors, but in the main app, the module loader is null for the module I tested with. So now I need to figure out why that doesnt display. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: There's an Under the hood: Application Domain slide in the presentation. It tries to show you that once you get StockVO in the main apps' AppDom, all modules will use that definition and won't use or need their own in the module. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Thursday, July 31, 2008 6:58 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Type Cast Error In order to use the StockVO object, I will have to have a definition of it in the module - in order to use it. I guess I am not sure if I will be right back where I started with the original problem. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ 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: 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 donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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 flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 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
[flexcoders] Re: Type Cast Error
Thank you!! I will take a look and let you know. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: It is picking up the class from a different application domain. See the modules presentation on my blog. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.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
[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 flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: It is picking up the class from a different application domain. See the modules presentation on my blog. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.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
RE: [flexcoders] Re: Type Cast Error
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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 5:52 PM To: flexcoders@yahoogroups.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 flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: It is picking up the class from a different application domain. See the modules presentation on my blog. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Wednesday, July 30, 2008 10:22 AM To: flexcoders@yahoogroups.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