Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.

Messages

  Messages Help
Advanced
Convert Object to a Value Object   Message List  
Reply Message #54253 of 152456 |
Hi All,

This is pretty basic but I cannot find the problem. I have service
that returns a userAccountVO. When I receive the result I am trying
to convert the event.result, that is an Object, to UserAccountVO and
I receive an error:

- Type Coercion failed: cannot convert Object@3841781 to
com.mvb.boe.vo.UserAccountVO.

Well the code is very simple like this:

var userAccount: UserAccountVO = new UserAccountVO();
userAccount = UserAccountVO(event.result);

In another application I had the same problem but solved it
assigning the properties one by one.

What is the problem ????

Thanks in advance.







Sat Oct 28, 2006 7:35 pm

mvbaffa
Offline Offline
Send Email Send Email

Message #54253 of 152456 |
Expand Messages Author Sort by Date

Hi All, This is pretty basic but I cannot find the problem. I have service that returns a userAccountVO. When I receive the result I am trying to convert the...
mvbaffa
Offline Send Email
Oct 28, 2006
7:36 pm

Try assigning it via the "preferred" method: userAccount = event.result as UserAccountVO; Shan _____ From: flexcoders@yahoogroups.com...
Shannon Hicks
iotashan
Offline Send Email
Oct 28, 2006
7:59 pm

2 more things to consider. Not sure of your particular setup, but, you may want to look at the [Managed] metadata tag. Setup dependent, it may be what you are ...
Michael Labriola
malabriola
Offline Send Email
Oct 28, 2006
8:47 pm

For those having trouble converting generic objects into class instances (Value Objects), I've created an ObjectTranslator.objectToInstance method to take care...
Darron J. Schall
darronschall
Offline Send Email
Oct 29, 2006
9:50 pm

Interesting, Yahoo garbled most of the content of that message. Here's what I actually sent: For those having trouble converting generic objects into class...
Darron J. Schall
darronschall
Offline Send Email
Oct 29, 2006
10:54 pm

Hello all, One less barrier to everyone trying out Flex: http://www.onflex.org/ted/2006/10/flexifier-is-live.php No need now to even download the SDK or Flex...
David Mendels
dmendels
Offline Send Email
Oct 30, 2006
12:22 am

Very cool, Have you guys seen FLEXible yet? http://www.osflash.org/flexible From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of...
Bjorn Schultheiss
bjorn.schult...
Offline Send Email
Oct 30, 2006
4:07 am

Yep, But John still working on it to be fitted. ... -- ... Igor Costa www.igorcosta.com...
Igor Costa
igorfrombrazil
Offline Send Email
Oct 30, 2006
7:56 am

nicely done ... instances ... inLibrary: true }; ... as Book;...
Michael Labriola
malabriola
Offline Send Email
Oct 30, 2006
12:54 am

Hi all, Thanks for your help. I was out for a few days, but today I will try, using your advises, to solve the problem. Thank you very much ... Here's ... ...
mvbaffa
Offline Send Email
Nov 3, 2006
11:00 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help