Hi,
I got not recognized function handler starting a job in vim9script.
"
Error detected while processing function <SNR>24_ZipUpDir:
line 60:
E700: Unknown function: MyHandlerCallback
"
And this is the vim9script:
"
vim9script
var jobid: job
var options: dict<any>
# Job Part {{{
def MyHandlerExit(channel: channel, msg: string): void
job_stop(jobid)
echomsg 'Exiting ' .. string(msg) .. ' ' .. string(@z)
def MyHandlerCallback2(channel: channel, msg: string)
echomsg string(msg)
enddef
options = { "callback": function('MyHandlerCallback2') }
job_start(cmd, options)
enddef
def MyHandlerCallback(channel: channel, msg: string): void
echomsg string(msg)
enddef
options = { 'callback': function('MyHandlerCallback'), 'exit_cb': function('MyHandlerExit'), 'timeout': 30000 }
jobid = job_start(cmd, options) | echomsg 'jobid: ' .. string(jobid)
"
Thank for help
NiVa
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ba0259f3-1ef2-4a29-9c4d-8929e18d8820n%40googlegroups.com.
No comments:
Post a Comment