On Sun, 16 Oct 2011 22:03:35 -0500
Terry Brown <[email protected]> wrote:

>     from leo.core.leoNodes import vnode
>     if not hasattr(vnode, 'insertAsLastChild'):
>         def ialc(self, c):
>             vnode(c)._linkAsNthChild(self, len(self.children))
>             return self.children[-1]
>         vnode.insertAsLastChild = ialc

Or without needing to pass in 'c'

from leo.core.leoNodes import vnode
if not hasattr(vnode, 'insertAsLastChild'):
    def ialc(self):
        vnode(self.context)._linkAsNthChild(self, len(self.children))
        return self.children[-1]
    vnode.insertAsLastChild = ialc

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