Re: [code][Textadept] Unable to modify context_menu

From: Franck Guadagnini <franckguadagnini.att.me.com>
Date: Fri, 11 Aug 2017 11:21:05 +0200

Hi Mitchell,

Tested: works as expected. Thanks.

Cheers,
Franck

> Le 10 août 2017 à 03:34, Mitchell <m.att.foicica.com> a écrit :
>
> Hi Franck,
>
> On Sun, 6 Aug 2017, Franck Guadagnini wrote:
>
>> Hi Robert,
>>
>> Thank you, it works. It's not documented in the book either.
>> I had already tried with "events.INITIALIZED"—after my first email—, but it didn't work. I was trying to replace the context_menu't table by my own.
>>
>> I've try again following your advice, and got it working this way:
>>
>> events.connect(events.INITIALIZED, function()
>> local context_menu = textadept.menu.context_menu
>> local my_table = my_table
>>
>> for i =1, #my_table do
>> context_menu[i] = my_table[i]
>> end
>> end)
>
> I've committed a fix[1] that allows for updating context menus without wrapping them in `events.INITIALIZED`. (It was already the case that you could update the standard menu without an event wrapper.)
>
> This will be in the next nightly build.
>
> Cheers,
> Mitchell
>
> [1]: http://foicica.com/hg/textadept/rev/b691095b2f21 <http://foicica.com/hg/textadept/rev/b691095b2f21>

-- 
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 Fri 11 Aug 2017 - 05:21:05 EDT

This archive was generated by hypermail 2.2.0 : Fri 11 Aug 2017 - 06:51:45 EDT