On Fri, Jul 17, 2015 at 11:21 AM, john lunzer <[email protected]> wrote:

> I see there is a getData method for reading from @settings @data nodes. I
> see a suspicious lack of a setData method in the same module. I'm guessing
> this is by design but is there any way to save to @settings through
> scripting?
>

​Heh.  In effect, you have exposed a smallish security hole in Leo.

There are settings which really should not be changed except by the user's
conscious decision.  You can run leoTest.leo to see a warning about a
security hole.  So if you could get a use to run a script to change the
settings, you would undermine Leo's startup security. Otoh, if you can get
the user to unknowingly run a Leo script, it could easily erase the entire
hard drive without further ado.

In any case, there is an easy answer to your question.  Write a script to
search for the desired setting in the @setting tree, creating it if need
be.  This is simply a search for the desired p.h.  Then set p.h or p.b as
appropriate.

Having said that, I see little or no reason for such a script.

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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to