"Plugins that change layouts probably don't have to worry about unexpected layouts."
I don't see it. Many users will want to change from one layout to another. If a plugin forces a specific layout at startup time, well and good but a user needs to be able to change it. On Friday, July 19, 2024 at 7:21:54 AM UTC-4 Edward K. Ream wrote: On Fri, Jul 19, 2024 at 6:10 AM Thomas Passin <tbp1...@gmail.com> wrote: We've been discussing how to create new layouts for Leo now that the old nested-splitter system is gone - see https://groups.google.com/g/leo-editor/c/nLfhTgnPcEc That thread includes a number of interesting scripts that can create new layouts. But they all have a serious problem: they all assume they are starting from Leo's default layout and they have no way of knowing if the actual layout has been changed before the script is run. If it has, the resulting layout will not be what was intended. Yes, this is a potential problem, but it will only be a problem if a user dynamically switches between layouts with `@button` or `@command` nodes. Plugins that change layouts probably don't have to worry about unexpected layouts. Anyway, scripts can test the parents of various widgets to see if those parents are as expected. If not, the script could restore the layout to a known starting point before changing the layout. In short, a bit more work is needed. Edward -- 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/4781203d-c1a8-4768-b4f7-25df8c0e7db0n%40googlegroups.com.