On Tue, Aug 3, 2010 at 2:55 PM, Terry Brown <[email protected]> wrote:
>> Why not step through the entire outline? p = c.rootPosition() ; >> afterLastNode = None. This should work for any set of nodes in the >> outline. > > Um, because I didn't spend enough time studying the API to fully understand > what it required. Yes, I suppose that would work. So p and afterLastNode > are really just hints to the method to allow it to not step through parts of > the outline which the caller knows do not include any of the target nodes? > So they could default to p = c.rootPosition() and afterLastNode = None, > giving you the > c.callback_on_list(aList, callback, start=c.rootPosition(), end=None) API? Yes, but following Ville's suggestion things have changed :-) There is no more afterLastNode arg: the scan continues until the end of the outline or all positions have been found. If you are actually deleting nodes this is perfectly safe. If you are moving nodes, it would be best to move nodes to a child of a node that can not be affected by any other moves. This is true for the top-level "Resurrected Nodes" node. 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.
