On Fri, May 24, 2013 at 11:40 AM, Edward K. Ream <[email protected]>wrote:


> When I have time, later today, I'll figure out what to do about bad args
> to v.cloneAsNthChild.
>

Well, it seems that the caller should take responsibility for ensuring that
the arguments to v.cloneAsNthChild are correct.  It *is* possible to check
the args as follows (not tested), following the pattern in c.clone::

    def cloneAsNthChild(self,parent_v,n):
        v = self
        c = v.context
        v._linkAsNthChild(parent_v,n)
        if c.validateOutline():
            return v
        else:
            v._cutLink(n,parent_v)
            return None

But this would be extremely slow, contrary to the intention of having the
vnode methods be fast.  So for now, the watchword will be, **user beware**.

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


Reply via email to