Page 1 of 1

Response from invokeOperation

Posted: Thu Apr 25, 2019 1:46 am
by nstensland
Is there a way to get a parameter back from the result of an
"editor.getActionsManager().invokeOperation('com.classname'', {parameter: value}, callback)"
call?

Similar to a function returning a result. Need to know the result of the invoke operation.

Thanks again,
Nat

Re: Response from invokeOperation

Posted: Thu Apr 25, 2019 12:22 pm
by mihaela
Hi,

The third parameter of the "invokeOperation" method is "callback", that receives the operation result. The following is the the documentation[1] of this parameter:
The Node-style callback to call when the operation finished executing. The callback's first argument is the error object or null; the second one is the actual result. In order to return a result from an operation one has to implement ro.sync.ecss.extensions.api.webapp.AuthorOperationWithResult .
[1] https://www.oxygenxml.com/maven/com/oxy ... nager.html

Best regards,
Mihaela