Response from invokeOperation

Post here questions and problems related to oXygen frameworks/document types.
nstensland
Posts: 21
Joined: Wed Jan 16, 2019 5:16 am

Response from invokeOperation

Post 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
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: Response from invokeOperation

Post 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
Mihaela Calotescu
http://www.oxygenxml.com
Post Reply