I’m trying to use the scintilla function SCI_GETLINE in a Javscript macro.
If I use: line = scimoz.getLine(linenumber) I get: NS_ERROR_XPC_NOT_ENOUGH_ARGS: Not enough arguments [ISciMozLite.getLine]
Fair enough. SCI_GETLINE has two arguments–the first for the line number and the second is a buffer to receive the text of the line. However, if I try: scimoz.getLine(linenumber, buffer), Komodo dies a big, fiery, where-do-you-want-to-send-the-ashes death. Interestingly, if buffer is an array Komodo does not die but buffer is empty.
SCI_GETLINE is supported as a python XPCOM function as komodo.editor.getLine(linenumber). It seems that there ought to be a way to call it with the Javascript API.
The scimoz and scintilla methods are helpers, they are not exposed through the API. Only properties on the module.exports object are exposed. So you do not have to worry about scintilla or scimoz yourself.
The editor API is loosely based on the CodeMirror one, meaning that much of the CodeMirror API documentation will also apply to the Komodo editor API.
We intend to have documentation for this by the time Komodo 9 final releases.