Re: [code] key and menu command change

From: Gabriel Dubatti <gdubatti.att.gmail.com>
Date: Mon, 13 Feb 2017 16:43:40 -0300

If the function doesn't have arguments you can use:

keys.ca= M.do_stuff

or

keys.ca= function() M.do_stuff() end

If you need to pass some arguments you need to use the second option:

keys.ca= function() M.do_stuff2(1, true) end

Best wishes,
Gabriel

El 13/02/2017 a las 16:22, Tasty Minerals escribió:
> Hi, I've dug out my old init.lua config and trying out new textadept.
> Looks like now we cannot use
>
> M = require "mymodule"
> keys.ca <http://keys.ca/> = {M.blabla}
>
> but need to change it to
>
> keys.ca <http://keys.ca/> = function() func(args) end
>
> I am confused, what does "func(args)" notation mean?
> Because changing it to
>
> keys.ca <http://keys.ca/> = function() M.do_stuff end
>
> throws a syntax error which should not happen, yes?
>
> Best,
> tastyminerals

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 13 Feb 2017 - 14:43:40 EST

This archive was generated by hypermail 2.2.0 : Tue 14 Feb 2017 - 06:44:02 EST