Thanks Peter. I didn't realize this as I was calling methods which were not returning anything. Added a handler & it works as you mentioned.
-Aejaz --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote: > > Aejaz, > > This is expected. > > You can't assign the result of a remote object call immediately to a > value. The Flash Player needs to make calls asynchronously so that the > movie does not stall while waiting for a response from the network. > Instead you're returned a token to help you track results from > asynchronous invocations. This is called the Asynchronous Completion > Token (ACT) pattern. You need to have a result handler registered for > your RemoteObject (or individual operation, or individual invocation on > the token itself). When the result event is raised, your handler will > get a ResultEvent which will have the Array result (as well as access to > the ACT token. > > Pete > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of aejaz_98 > Sent: Sunday, June 11, 2006 6:00 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Flex2B3: Problem returning Object[] from a > RemoteObject call > > > > Hi, > > I am calling a java method on server side which returns > an array of type Object[]. On the client side I do the > following, > > var arr:Array = remoteObject.call(); > > Doing this gives me an exception which says, > > TypeError: Error #1034: Type Coercion failed: cannot convert > mx.rpc::[EMAIL PROTECTED] to Array. > > After changing the type of arr to AsyncToken ,I do see that > there is a result field in the AsyncToken object which was > returned but that too is null. What is the significance of > the AsyncToken object here ? > > According to the Flex Developer's guide(page 1154), I would have > got an Array as the result of the call. Please let me know what am > I doing wrong. > > Thanks, > Aejaz > ------------------------ Yahoo! Groups Sponsor --------------------~--> Protect your PC from spy ware with award winning anti spy technology. It's free. http://us.click.yahoo.com/97bhrC/LGxNAA/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/