On Mon, Apr 1, 2013 at 11:19 AM, Terry Brown <[email protected]>wrote:

> I don't even know how to work out the p for the script the node lives in,
when running from a button

I just took a look at the mod_scripting.py plugin.  At present, there is no
real way to get that node automatically, and I don't think it is worthwhile
complicating already-too-complicated code to make that data available.

Happily, scripts could, if they wanted, discover the code for any @button
node (or any other node ) using g.findNodeAnywhere(c,headline)::

    p = g.findNodeAnywhere(c,'@button whatever')
    print(p.b)

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to