On Sun, Jul 6, 2008 at 9:34 AM, zpcspm <[EMAIL PROTECTED]> wrote: > > The question that popped up today after diving into the souces of leo is: > why one shall > associate fileLevel with a position, not with a vnode directly (to be > more exact, with that v, that is passed to p.__init__() and becomes p.v)?
Leo typically provides position methods, like p.fileLevel, as the standard interface to all getters. That way, you don't have to remember where the "real" getter is. It would usually be bad style to use a v getter when a p getter exists, assuming, of course, that a position p is available. More importantly, many getters exist *only* for positions: they don't make sense for nodes. fileLevel is (or will be, when it exists) that kind of getter. Indeed, fileLevel is defined only at a particular spot in a tree traversal: the same vnode will have different fileLevel's if the vnode appears as a clone in different levels of a tree. HTH. 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 -~----------~----~----~----~------~----~------~--~---
