Re: [code] Can I access the menu-bar with the Curses UI?

From: David Tamar <david-tamar.att.outlook.com>
Date: Tue, 23 Jul 2019 19:38:59 +0000

I took some time to figured out what was wrong in my init file, and it turns out the “_L[]” dictionary which I gave up mentioning in every key binding I made. I re-added that back in each occasion a menu item was accessed by its name and my keybindings are fully-functional now throughout Curses.

There are some small clashes with bash/terminal keybindings which I probably will have to re-adjust. Most notably Ctrl-Z, which halts the execution of the program and returns to bash, while it is also my “undo” binding in Textadept.

I didn't know it was so important to mention “_L[...]” everywhere, because some modules provide menu items that don't require “_L[...]”, for example here:

`local m_ctags = textadept.menu.menubar[_L['_Search']]['_Ctags']`

The “['_Search']” item is ambifixed with “_L[...]”, however “['_Ctags']” is not.
________________________________
From: Mitchell <m.att.foicica.com>
Sent: Tuesday, July 23, 2019 21:17
To: code.att.foicica.com <code.att.foicica.com>
Subject: Re: [code] Can I access the menu-bar with the Curses UI?

Hi David,

On Tue, 23 Jul 2019, David Tamar wrote:

> Hi, I didn't try the Curses UI until now, but since I use Midnight Commander quite a lot, I thought maybe using the Curses version of Textadept would be more appropriate for MC usage because it's a terminal application that uses Curses too.
>
> I launched Textadept with Curses and it appears that some of my keybindings that depend on various menu-bar items are no longer functional and cause the init file to fail since the menu-bar appears to be unavailable (nil) in Curses? Or am I missing something? I looked in the docs but I can't figure out how to access the top menu-bar in Curses.
>
> My Textadept version is 10.5 and it is built successfully on Debian (testing).

While the menubar is not visible in curses, you can access its contents via `textadept.menu.menubar`, just like in GUI Textadept. Thus, keybindings should work without issue. What code are you using that is causing trouble?

Cheers,
Mitchell

--
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.
-- 
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 Tue 23 Jul 2019 - 15:38:59 EDT

This archive was generated by hypermail 2.2.0 : Wed 24 Jul 2019 - 06:57:31 EDT