On Thursday, November 14, 2013 9:22:01 AM UTC-6, Edward K. Ream wrote:

> g.createScratchCommander() would indeed be good to have, because initing 
it properly is non-trivial.

I have mixed thoughts about this.  On the one hand, using an existing 
commander should be safe.   And it might actually be the fastest way.  
Deleting a node p.doDelete() is extremely fast in the present 
implementation.  More importantly, it will have no effect on undo.  In 
short, there are no serious downsides to the method that the 
outline-abbreviations code uses.

But wait a minute.  There already *is* a minimal commander that could be 
used.  It's the commander created by the leoBridge module.  Specifically, 
here is the relevant code from the leoBridge.createFrame::

    c = g.app.newCommander(fileName)
    frame = c.frame
    frame.createFirstTreeNode()
    assert c.rootPosition()
    frame.setInitialWindowGeometry()
    frame.resizePanesToRatio(frame.ratio,frame.secondary_ratio)

This looks like a candidate for g.createScratchCommander().  I'll put it on 
the list of things to play with.

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

Reply via email to