That works too http://www.narancs.net/flex/ClassMappingExample/ClassMappingExample.html (view source enabled)
Andi Oriol Gual wrote: > First of all, I'd like to thank you all. > > I tried Renaun's example, and with ServiceCapture, it is returning an > array of BookVO. At this point everything seems OK. > > But when you receive this array, if you do something like this: > > var testBook : BookVO = new BookVO; > testBook = BookVO(ModelLocator.getInstance().books[0]); > > It will fail, because the objects inside the array collection aren't > BookVO's , they are Objects: > TypeError: Error #1034: Type Coercion failed: cannot convert > [EMAIL PROTECTED] to com.renaun.samples.vo.BookVO. > > And the same happens with your example Andi. > > Then, my question is, can anyone do this without the coercion error, > and, without extra functions to map it? > > Thanks, Oriol. ------------------------ Yahoo! Groups Sponsor --------------------~--> See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/3EuRwD/bOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/