On Thursday, May 18, 2017 at 9:08:21 AM UTC-5, Edward K. Ream wrote:
Rev 290bfe9 is a significant milestone. Top-level nodes *of the real Leo
> outline* are drawn correctly with the "native" top-level switch enabled.
> Considerable work is still required in *this phase* of the project, which
> is far from the final phase. Otoh, this is arguably the most difficult
> phase, and it is now nearing its end.
>
f3df1d marks the end of this phase of the project. The outline is drawn
correctly using actual outline nodes (vnodes and positions), all arrows
keys work as in Leo, headline editing works and nodes can be inserted and
deleted correctly.
This was tedious and difficult work. It accelerated this afternoon after
fixing a nasty bug in the LeoValues cacher. Happily, the resulting code is
straightforward. The "native" top-level switch highlights the changes
needed to use Leo's vnode tree rather than a tree of npyscreen.TreeData
objects.
Actually, such objects still exist (LeoTreeData nodes) but these nodes
don't "carry" outline structure directly. Instead, they just refer to Leo
positions. LeoMLTree._set_line_values sets printing ivars as needed from
the Leo positions. This is the only place where outline structure is
actually used, so there is no need for LeoTreeData (or LeoTreeLine) to
define properties that would "deliver" the structure data in the form that
used by other npyscreen classes. So this is a good encapsulation on
npyscreen's part.
I am going to take a break to write up the work for the npyscreen list
while I remember all relevant details. I am proud of the work. It should be
helpful to others. The "native" switch highlights the changes. Btw,
_set_line_values doesn't exist in the base MLTree class. It came into
existence as the result of a major refactoring of MLTree.update. During
this refactoring, all wretched weakref's disappeared from tree-related
classes, never to be missed.
The next phases of this project will complete the circle of events. Leo
must be able to drive the screen, and user events must affect the Leo
outline. The various 'i', 'd', 'h', npyscreen outline commands (and
others, such as '{', '}', '<', '>', etc) could be called prototypes of
needed code. I expect the last phases of the project to be relatively
straightforward. We shall see...
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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.