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

2009-04-30 Thread Alex Harui
ogroups.com] On Behalf 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: - Y

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
It all comes down to your applicationDomain topology. I'd be checking link-reports for every SWF in the project. These errors usually indicate that a class is in two different SWFs loaded into sibling appDoms. Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http:/

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 PM

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. HT

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 O

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 wrote: > >

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

2009-04-30 Thread Alex Harui
Time for you to read the presentation on Modules on my blog. It should explain why you're getting that error. Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behal

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 wrote: > > > Also, I now have it working if I change from trying to coerce to a > valueObject and just use a generic Object instead. > > > --- In flexcoders@yahoogroups.com , Pedro > S

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 wrote: > > > 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 > > Model.ValueObjects::