Try this:

----
p = c.p.clone()
dest = g.findNodeAnywhere(c,'ActionItems')
p.moveToLastChildOf(dest)
c.redraw()
---

moveToLastChildOf is expecting a position, not a name. :)

Hope this helps,
-->Jake

On 7/31/2015 12:01 PM, Tim Fuller wrote:
Thank you very much for the quick reply. I'm feeling quite dumb right now as I'm still unable to get this to work. I have the following script:

|

p =c.p.clone()


p.moveToLastChildOf(ActionItems)


c.redraw()

|

But it only pastes the clone directly underneath the current. I get an error in the log stating.

|
exception executing script
NameError: name 'ActionItems' is not defined
|

Can I not call a Node directly by it's name? Or have I done something else incorrectly?

Thank you


On Friday, July 31, 2015 at 10:19:41 AM UTC-4, Edward K. Ream wrote:


    On Friday, July 31, 2015 at 9:04:36 AM UTC-5, Tim Fuller wrote:


        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?


    http://leoeditor.com/cheatsheet.html#scripting
    <http://leoeditor.com/cheatsheet.html#scripting>

    EKR

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

--
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