On Fri, Jul 31, 2015 at 8:58 AM, Tim Fuller <tfulle...@gmail.com> wrote:

> Hello All,
>
> I've recently discovered Leo and really loving it.  I am trying to get
> into the scripting but I'm having trouble doing a simple operation.  Could
> someone please help me out or point me to the documentation that would lead
> to the answer?
>
> I'm wanting to write a simple script that would take the highlighted node
> and clone it to an action item list.
>
> So, I'm wanting to clone a node as a child to
> ​​
> ActionItems.  I've gotten as far as tmpNode = c.p.clone()  And
> tmpNode.paste() works exactly as expected.  I just can't figure out how to
> dictate where to paste it.
>

​Let p = tmpNode Try p.moveToLastChildOf(​ActionItems) or
p.moveToNthChildOf(ActionItems, n)

You must also do a c.redraw() to make the change visible.

If you use the standard nomenclature (p, p2) etc, you can use typing
completion (Alt-1) to discover appropriate methods.

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 post to this group, send email to leo-editor@googlegroups.com.
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