I am trying to create a new .leo file that I will populate using a
script
However, these two methods (from Leo web page docs) do not work as I
expect.
Method 1:
import leo.core.leoGui as leoGui
nullGui = leoGui.nullGui("nullGui")
c2,frame = g.app.newLeoCommanderAndFrame(fileName=None,gui=nullGui)
c2.frame.createFirstTreeNode()
# Test that the script works.
for p in c2.all_positions():
g.es(p.h)
Method 2:
fileName='test.leo'
ok, frame = g.openWithFileName(fileName,c)
new_c = frame.c
Method 1 produces 'New Headline' in the Log pane but I do not see the
outline. I can rename the only headilne, add another headline (using
c2.insertHeadline()) and I tried redawing but I see nothing visually
to work with.
With Method 2 can not figure out what to do next, in terms of setting
the test.leo outline and adding nodes.
--
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.