On Mon, Aug 8, 2011 at 9:27 AM, Kent Tenney <[email protected]> wrote:
> Howdy,
>
> Is there an easier way to get a node [UNL] than to iterate through parents?

This discussion is amusing. Almost all such questions can be
researched by doing a few searches.  Here, my first thought was be to
discover how UNL's are already computed.  Searching for UNL (word
search) I found the following:

Plugins-->Commands & directives-->@file quickMove.py-->class
quickMoveButton-->computeUNL

This plugin isn't always enabled, so I looked in Leo's core:

Code-->Gui base classes-->@file leoFrame.py-->class
leoTree-->leoTree.select & helpers-->selectHelper

    # what UNL.py used to do
    c.frame.clearStatusLine()
    c.frame.putStatusLine("-->".join(reversed(
        [i.h for i in p.self_and_parents()])))

Had the helpful comment not been present, I could have found the code
by looking for calls to putStatusLine.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to