If you have a RemoteObject instance using mxml, why not just use it instead of programatically creating another instance?
Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Vega Sent: Wednesday, July 30, 2008 3:33 PM To: [email protected] Subject: Re: [flexcoders] dynamic remote objects That makes total sense because I also have an mxml tag in the document.I changed the code // setup the remote method var service:mx.rpc.remoting.RemoteObject = new mx.rpc.remoting.RemoteObject(); service.destination = "ColdFusion"; service.source = component.text; // the method needs to know about the remote object var operation:Operation = new Operation(service); operation.name = method.selectedItem.NAME <http://method.selectedItem.NAME> ; operation.addEventListener(ResultEvent.RESULT,loadGridData); operation.send(); and it still gives me the same error. Thank You Dan Vega On Wed, Jul 30, 2008 at 2:29 PM, Sid Maskit <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: ActionScript has two RemoteObject classes. The compiler is telling you that it does not know which of them you want to use when you say 'var service:RemoteObject = new RemoteObject("ColdFusion");'. From the looks of the error message, I would guess that you have a RemoteObject tag in your MXML, or that you are otherwise importing the mx.rpc.remoting.mxml:RemoteObject class. You either need to remove whatever tag or script that is using the MXML version of RemoteObject, or you need to fully qualify the class name in your statement, something like this: var service:mx.rpc.remoting.RemoteObject = new mx.rpc.remoting.RemoteObject("ColdFusion");' Hope that helps, Sid ----- Original Message ---- From: Dan Vega <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > To: [email protected] <mailto:[email protected]> Sent: Wednesday, July 30, 2008 9:29:54 AM Subject: Re: [flexcoders] dynamic remote objects Ok, I figured out what I was doing wrong but I am still getting an error. I think this is the right way to use remote object in AS3 import mx.rpc.remoting. RemoteObject; import mx.rpc.remoting. Operation; // setup the remote method var service:RemoteObjec t = new RemoteObject("ColdFusion"); service.source = component.text; // the method needs to know about the remote object var operation:Operation = new Operation(service) ; operation.name = method.selectedItem .NAME <http://method.selectedItem.NAME> ; operation.addEventL istener(ResultEv ent.RESULT, loadGridData) ; operation.send( ); But I am still getting this error and I am not sure why? Can not resolve a multiname reference unambiguously. mx.rpc.remoting. mxml:RemoteObjec t (from C:\Program Files\Adobe\ Flex Builder 3\sdks\3.0.0\ frameworks\ libs\rpc. swc(mx/rpc/ remoting/ mxml/RemoteObjec t)) and mx.rpc.remoting: RemoteObject (from C:\Program Files\Adobe\ Flex Builder 3\sdks\3.0.0\ frameworks\ libs\rpc. swc(mx/rpc/ remoting/ RemoteObject) ) are available. RemoteObject/ src Main.mxml Unknown 1217435341365 1308 Thank You Dan Vega On Wed, Jul 30, 2008 at 11:46 AM, Tom Chiverton <tom.chiverton@ halliwells. com <mailto:[EMAIL PROTECTED]> > wrote: On Wednesday 30 Jul 2008, Dan Vega wrote: > I have a remote object that is very dynamic.The user is actually selecting > the source of the component and the method name. Send the component name, method and arguments list to a generic service method that does the invoke for you. And be sure to check that the object name and method are at least members of a list you expect to receive, or you risk creating a security problem. -- Tom Chiverton ************ ********* ********* ********* ********* **** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells. com <http://www.halliwells.com> . ------------ --------- --------- ------ -- Flexcoders Mailing List FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> Search Archives: http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo <http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo> ! Groups Links http://groups. yahoo.com/ group/flexcoders / <http://groups.yahoo.com/group/flexcoders/> (Yahoo! ID required) mailto:flexcoders-fullfeat [EMAIL PROTECTED] .com <mailto:[EMAIL PROTECTED]> flexcoders-unsubscr [EMAIL PROTECTED] com <mailto:[EMAIL PROTECTED]>

