[code] [textadept] Menu modification delay 3

From: Gabriel Dubatti <gdubatti.att.gmail.com>
Date: Mon, 14 Nov 2016 12:35:41 -0300

Hi Mitchell,

After removing the test from:

   if not type(v) == 'function' then update(menubar or menu) end

all my changes are shown again.

I hope that helps.

Best wishes,
Gabriel

---------- Forwarded message ----------
From: Gabriel Dubatti <gdubatti.att.gmail.com>
Date: 2016-11-12 20:30 GMT-03:00
Subject: Re: [code] [textadept] Menu modification delay 2
To: code.att.foicica.com

Hi Mitchell,

    When I tried this change at home I noticed that all my modifications in
the menus are missing:

    1) adding a new item to the menu bar:

            textadept.menu.menubar[ #textadept.menu.menubar+1 ]= {...}

    2) modifying the edit menu:

            local med=textadept.menu.menubar[_L['_Edit']]
            med[#med+1]= {''}
            med[#med+1]= {'Trim trailing spaces', Proj.trim_trailing_spaces}

    3) the context menu:

            textadept.menu.context_menu[ #textadept.menu.context_menu+1 ]=
{...}

    4) and the tab context menu:

            local menu= textadept.menu.tab_context_menu
            insert_menu(menu,2,{'Close Others', Proj.close_others})

    Cheers,

    Gabriel

El 11/11/16 a las 12:04, Mitchell escribió:

Hi Gabriel,
>
> On Thu, 10 Nov 2016, Gabriel Dubatti wrote:
>
> Hi Mitchell,
>>
>> Splitting the code in this way:
>>
>> local m1=_L['_File']
>> local m2=_L['_New']
>>
>> ....
>>
>> local m15=_L['Quickly Open _Current Directory']
>> local m16=_L['Quickly Open Current _Project']
>>
>> -------
>>
>> local menu= textadept.menu.menubar[m1]
>> menu[m2][2]= nf
>> menu[m3][2]= of
>> menu[m4][2]= orf
>> menu[m5][2]= cb
>> menu[m6][2]= cab
>> ....
>>
>> I can confirm that all the delay is in menu[] modification.
>>
>
> Thanks for your sleuthing! I've committed a fix[1] that should prevent the
> delays over time. Please test for side effects, as I do not use a menubar
> at all and my regression tests may not have covered everything.
>
> Cheers,
> Mitchell
>
> [1]: http://foicica.com/hg/textadept/rev/fb9057b47510
>

-- 
Saludos,
Gabriel.
-----------------------------------------------------------
gdubatti.att.gmail.com
-- 
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 14 Nov 2016 - 10:35:41 EST

This archive was generated by hypermail 2.2.0 : Tue 15 Nov 2016 - 06:52:23 EST