Get values from @settings

35 views
Skip to first unread message

gar

unread,
Jul 19, 2019, 2:46:42 PM7/19/19
to leo-editor
How to obtain values from @settings node from the same .leo file?

I want to have
@settings
- @color some-color = red

and obtain it from the script with c.config.getColor("some-color")

Now I get None albeit docs says that there should be value I defined.

Inspecting config object shows that ther's no such a key:

g.es([k for k in c.config.settingsDict.keys() if k.startswith('some')]) -> []

vitalije

unread,
Jul 20, 2019, 9:07:51 AM7/20/19
to leo-editor
Perhaps you need to restart Leo to see new settings, or try to execute `reload-settings`.

gar

unread,
Jul 22, 2019, 4:30:47 AM7/22/19
to leo-e...@googlegroups.com
This was my fault. Reloading settings helps. Thanks.
This is consequence of dealing with IDEs where settings are applied immediately.

сб, 20 июл. 2019 г. в 16:07, vitalije <vita...@gmail.com>:
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/6f03976a-e1ec-456e-b6de-05026d3f013d%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages