Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I handle the results returned from a service function?

0
Posted

How do I handle the results returned from a service function?

0

Users can either provide specific result handlers or generic result handlers. Also, a responder can be provided at the service level for all method calls, or provided as the first parameter to each individual method call. Using the timeline “this” as the default responder objects, with specific callback handlers: //Use the timeline as the default responder, passed as the second parameter //to get service myService = gateway_conn.getService(“my.service”, this); … //service function myService.remoteMethodName(param1, “param2”); // a function that handles the results // from the remoteMethodName function function remoteMethodName_Result ( result ) { myListBox.setDataProvider(result); } // a function that handles the errors // thrown by the remoteMethodName function function remoteMethodName_Status ( result ) { myListBox.setDataProvider(result); } Using a custom responder object, with generic callback handlers as the default responder: MyResponder = function() { this.onResult = function(

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123