Example layout scripts

26 views
Skip to first unread message

Edward K. Ream

unread,
Jun 24, 2024, 8:27:30 AM (5 days ago) Jun 24
to leo-editor
ScriptingInfo item #3982 now contains several tested scripts that alter Leo's window layout.

These kinds of scripts replace the free_layout and nested_splitter plugins.

Please take a look and report any problems you might find.

Thomas, feel free to add any scripts you please.  If necessary, I'll hide the body of the scripts using the <details> markup.

Edward

Thomas Passin

unread,
Jun 24, 2024, 8:49:22 AM (5 days ago) Jun 24
to leo-editor
Thanks for the examples.  One nit: the command to detach VR uses c.k.simulateCommand().  Remember, we were supposed to start using the new c.doCommandByName(). ("Old habits die hard").

Edward K. Ream

unread,
Jun 24, 2024, 9:32:15 AM (5 days ago) Jun 24
to leo-e...@googlegroups.com
On Mon, Jun 24, 2024 at 7:49 AM Thomas Passin <tbp1...@gmail.com> wrote:
Thanks for the examples.  One nit: the command to detach VR uses c.k.simulateCommand().  Remember, we were supposed to start using the new c.doCommandByName(). ("Old habits die hard").

Thanks. I've updated the scripts.

Edward

Thomas Passin

unread,
Jun 24, 2024, 10:00:46 AM (5 days ago) Jun 24
to leo-editor
I didn't realize that nulling a widget's parent would make it free-floating.  I suppose it makes sense.  One quirk, not a fault of the script.  At least with VR3 (and most likely with VR, too) if you set it free floating while it's already visible it will receive the node changed event and change its rendering as you select different nodes.  If you open it and set it free-floating *before* it's been opened, it doesn't receive the node changed event and the body being rendered doesn't change.  VR3 has a "Reload" menu action, and that will reload with the currently selected node.

I don't think it's worth trying to do anything about this behavior, but it's worth noting.

Edward K. Ream

unread,
Jun 24, 2024, 12:06:54 PM (5 days ago) Jun 24
to leo-e...@googlegroups.com
On Mon, Jun 24, 2024 at 9:00 AM Thomas Passin <tbp1...@gmail.com> wrote:
I didn't realize that nulling a widget's parent would make it free-floating.  I suppose it makes sense.  One quirk, not a fault of the script.  At least with VR3 (and most likely with VR, too) if you set it free floating while it's already visible it will receive the node changed event and change its rendering as you select different nodes.  If you open it and set it free-floating *before* it's been opened, it doesn't receive the node changed event and the body being rendered doesn't change.  VR3 has a "Reload" menu action, and that will reload with the currently selected node.

I don't think it's worth trying to do anything about this behavior, but it's worth noting.

Thanks for these comments. I was surprised that there was no need to keep explicit references to the new widgets.

I created the info item in large part to have a place for you to put your own layout-related scripts :-)

I think the ScriptingInfo label solves a long-standing conundrum.  Feel free to create your own ScriptingInfo issues.

Edward
Reply all
Reply to author
Forward
0 new messages