Yes:

log = c.frame.log
g.es(log.orderedTabNames())

BTW, here's how I found this.  I certainly didn't remember, and you may 
have a better way.  Start with the script for your button. It calls a 
method log.deleteTab.  In Leo's core code, similar methods are generally 
grouped together under the same parent node.  So I used the Nav tab - my 
favorite for searches - and typed in "deleteTab".  It returned two 
headlines that matched, one of which was "LeoLog.deleteTab".  I clicked on 
that entry and was navigated to that part of the code.  Then I just scanned 
the other names until I noticed "LeoLog.orderedTabNames".  That was it.

I usually find this to be the most effective way to proceed.  Sometimes you 
don't get a hit on a method or class definition but you find a place that 
it is called.  You can CTRL-click on its name in the code and Leo will 
(usually) succeed at navigating you to its *def: *or *class: *definition.

Now that I've gotten used to working this way, I don't know how I could 
stand going back to non-Leo ways of managing of code bases.
On Sunday, April 9, 2023 at 7:22:19 AM UTC-4 lewis wrote:

> I use an @button Delete-TAB
>
>     TAB_name = g.app.gui.runAskOkCancelStringDialog(c,'Delete TAB',"Enter 
> Tab name: ").strip()
>     c.frame.log.deleteTab(TAB_name)  # delete named Tab
>
> Is there a way to get a list of Tab names?
> On Sunday, April 9, 2023 at 12:28:45 AM UTC+10 tbp1...@gmail.com wrote:
>
>> Yes, as long as you know its name, which you do from its label:
>>
>>     log.deleteTab(TABNAME)
>>
>> On Saturday, April 8, 2023 at 10:26:30 AM UTC-4 jkn wrote:
>>
>>> This look interesting, thanks.
>>>
>>> One thing I have never really needed, but occasionally wondered about; 
>>> it is possible to *delete* a tab in the log pane? (perhaps it should be 
>>> called the 'tab pane'?...)
>>>
>>>     J^n
>>>
>>> On Friday, April 7, 2023 at 3:04:48 PM UTC+1 tbp1...@gmail.com wrote:
>>>
>>>> The VR3 plugin can now optionally open in a tab in the log pane instead 
>>>> of in its own panel in the main Leo window (also referred to as a pane in 
>>>> the splitter).  I have attached a screen shot that shows the panel layout 
>>>> that I like when using VR3 in a tab.
>>>>
>>>> There are two new commands to control that tab behavior:
>>>>
>>>> vr3-tab -- opens VR3 in a tab
>>>> vr3-toggle-tab -- opens or closes VR3 in a tab.
>>>>
>>>> I like to use an @button node in the @settings tree to make a button 
>>>> for vr3-toggle-tab. The button runs
>>>>  c.k.simulateCommand('vr3-toggle-tab').
>>>>
>>>> vr3-toggle will close VR3 if open in a splitter pane as well as in a 
>>>> tab.  Next time, the command will open it in the splitter.  Conversely, 
>>>> vr3-toggle-tab will close VR3 in either a tab or the splitter, but 
>>>> will re-open it in a tab the next time the command is run.
>>>>
>>>> An advantage to running VR3 in a tab is that you can open something 
>>>> else in a new splitter pane without interfering with VR3.
>>>>
>>>> One minor drawback is that focus will switch to the log pane when 
>>>> something is written there - most likely when the outline has been saved.  
>>>> Then you have to click in the VR3 tab to see it again.  I haven't found 
>>>> this to bother me much.
>>>>
>>>> This new behavior has now been merged into the devel branch, so it's 
>>>> ready to try out.
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/c1616f28-1b44-4509-b1b0-34bb0a315fc0n%40googlegroups.com.

Reply via email to