Hi,
Applying timer_start help, I would like to differ from example by calling a function declared as dict member and passing FuncName at timer_start parameter.
I got that message :
E117: Unknown function:
-------------------THE CODE---------
fu! g:messagesManager.DisplayMessage(timer) "{{{
	echo printf("%s",self.messagesBuffer[self.currentMessageIndex])
	let self.currentMessageIndex+=1
	if self.currentMessageIndex==len(self.messagesBuffer)
		let self.currentMessageIndex=0
	endif
endfu
"}}}
fu! g:messagesManager.StartDisplay() "{{{
	" if has('timers') && !exists('s:timer')
	let FuncRef = function('self.DisplayMessage')
	let FuncName = string(FuncRef)
	if has('timers')
		let s:timer = timer_start(1000,
					\ FuncName, {'repeat': 10})
	else
		echo "timers not supported by your version of vim"
	endif
endfu
-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.
Friday, October 21, 2016
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment