Re: [flexcoders] Re: Why would as keyword not work

2009-04-30 Thread Pedro Sena
Are you using modules? On Thu, Apr 30, 2009 at 2:17 PM, valdhor valdhorli...@embarqmail.comwrote: Hmmm. Looks like I misspoke. now I get... Type coercion failed. Cannot convert Model.ValueObjects::detaild...@11c0a941 to Model.ValueObjects.DetailData. What is the difference between a

Re: [flexcoders] Re: Why would as keyword not work

2009-04-30 Thread Pedro Sena
Are you transfering data from one module to another(or to its parent) ? On Thu, Apr 30, 2009 at 2:41 PM, valdhor valdhorli...@embarqmail.comwrote: Also, I now have it working if I change from trying to coerce to a valueObject and just use a generic Object instead. --- In

RE: [flexcoders] Re: Why would as keyword not work

2009-04-30 Thread Alex Harui
Of valdhor Sent: Thursday, April 30, 2009 10:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Why would as keyword not work Yes, I have an interface which I am implementing in the modules. It has a single set method that populates a single object with data. The data transfer

Re: [flexcoders] Re: Why would as keyword not work

2009-04-30 Thread Pedro Sena
Hmmm Appears to be the most common problem... Please make a test: Create a dummy variable in the same class that you are using your VO, something like var dummy:DetailData = null; Keep the rest of the code and tell me the results. Regards On Thu, Apr 30, 2009 at 2:58 PM, valdhor

Re: [flexcoders] Re: Why would as keyword not work

2009-04-30 Thread Pedro Sena
Forgot to say: In the same class(in your module) that is receiving the parameter from your app. Another thing, make sure your main app and your module are in the same application domain, if you have some doubt about it, please post here the code that you are using to load your module. Regards

Re: [flexcoders] Re: Why would as keyword not work

2009-04-30 Thread Ian Thomas
As Pedro says - my guess would be that you are passing a DetailData object from one module to the other when you haven't loaded the modules in the same ApplicationDomain (or from one compiled .swf to another, if you're not using modules). Take a look at the documentation for ApplicationDomain.

Re: [flexcoders] Re: Why would as keyword not work

2009-04-30 Thread Pedro Sena
Pedro - The ValueObject is only being used by this particular module - not by the application (Or any other module). If the VO is not being used, why are you trying to cast to it? I think I didn't understand. BTW, Have you done the test that I suggest ? Regards, On Thu, Apr 30, 2009 at 5:11

RE: [flexcoders] Re: Why would as keyword not work

2009-04-30 Thread Alex Harui
://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Thursday, April 30, 2009 1:44 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Why would as keyword not work The VO is being used by this module (And is not used

Re: [flexcoders] Re: Why would as keyword not work

2009-04-30 Thread Ian Thomas
Steve, My guess at what is going on - based on my limited understanding of what you're doing - is: - You have your class definition (DetailData) compiled in to your main application and into your module. - You load your module into your main application - Because you have not specifed that you

RE: [flexcoders] Re: Why would as keyword not work

2009-04-30 Thread Alex Harui
Of Ian Thomas Sent: Thursday, April 30, 2009 1:22 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Why would as keyword not work Steve, My guess at what is going on - based on my limited understanding of what you're doing - is: - You have your class definition (DetailData) compiled