[code] Re: [textadept] Menu problem in textadept 8.7

From: Richard Philips <richard.philips.att.gmail.com>
Date: Sat, 21 May 2016 18:45:33 +0200

Hi Mitchell,

thank you very much: everything works now.

I'm under the impression that the startup of textadept is much faster (of
course, it can just be relief :-)

I noticed some problems with textadept on OSX:

- a lot of CPU usage
- a lot of memory consumption

but I will investigate further (that computer was on textadept 8.6)

Richard

On Saturday, May 21, 2016, Mitchell <m.att.foicica.com> wrote:

> Hi Richard,
>
> On Fri, 20 May 2016, Mitchell wrote:
>
> Hi Richard,
>>
>> On Fri, 20 May 2016, Richard Philips wrote:
>>
>> Hi Mitchell,
>>>
>>>
>>> local x = textadept.menu.context_menu
>>>
>>>
>>> does not give an error any more, but I cannot change the context_menu:
>>>
>>>
>>> if textadept.menu.context_menu then
>>> local m = textadept.menu.context_menu
>>> m[#m+1] = SEPARATOR
>>> m[#m+1] = {'Close', io.close_buffer}
>>> end
>>>
>>>
>>> does not change the context menu.
>>>
>>
> I forgot that all menus are loaded on `events.INITIALIZED`. Only the
> menubar was mentioned in 8.7's changelog[1], but it applies to context and
> tab menus too. I assume your code is in "~/.textadept/init.lua"? If so,
>
> events.connect(events.INITIALIZED, function()
> local x = textadept.menu.context_menu
> ...
> end)
>
> should work.
>
> Sorry for the trouble. It seems my fix was rather hasty. I'll look into
>> this more later today and get back to you.
>>
>
> The fix is still valid, as there shouldn't be a stack overflow, but the
> initial `nil` result was because the menus haven't loaded yet.
>
> Cheers,
> Mitchell
>
> [1]: http://foicica.com/lists/code/201604/3171.html
> --
> 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.
>
>

-- 
Richard Philips
<http://anet.be>
Bibliotheek UAntwerpen
Stadscampus - S.A.085
Prinsstraat 9 - 2000 Antwerpen
richard.philips.att.uantwerpen.be
T +32 3 265 49 71
<http://anet.be>
-- 
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 Sat 21 May 2016 - 12:45:33 EDT

This archive was generated by hypermail 2.2.0 : Sun 22 May 2016 - 06:34:27 EDT