Monday, April 27, 2015

Re: Build amenu from Funcref

On Monday, April 27, 2015 at 1:43:00 AM UTC-5, Ni Va wrote:
>
>
> Hi Ben
>
> I knew that call was different from exe and I supposed that I bad explained the probleme.
>
>
> Calling and building a local func like you do is easier than calling a func declared as "object method" in a dedicated vimscript.
>
> You can see in attached file that I have wrote similar object as described here : http://bling.github.io/blog/2013/08/16/modularizing-vimscript/
>
> Although, I got E488 error when I use the button menu the script buildt.

Can you attach a small self-contained test case demonstrating the problem in just a few lines, please? I don't have time to go through your script to figure out what it is TRYING to accomplish.

I thought from your previous messages you were trying to call actual functions. If this is the case, I don't know if this will work without a simpler example, but it may help to re-interpret the string function name as a function before calling it:

exe 'anoremenu PfiTest.'.foo.' :call function('.string(m[foo]).')()<CR><CR>'


This still throws errors when I edit your script as above, however, I don't have the slightest idea what the script is trying to do in the first place, so perhaps that is a different problem.

--
--
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.

No comments:

Post a Comment