On Mon, 13 Feb 2012 01:54:45 -0800 (PST)
nakedmind <[email protected]> wrote:

> So we can have a
> text nodetype for plain text, an html nodetype to handle html data,
> movie nodetype for dealing with quicktime, mpeg data, a code nodetype
> for writing code, etc. The code and html nodetypes can subclass from
> the text nodetype since they all deal with textual data.

Hi Eric,

Aside: A few months ago there was a thread about integrating Blender and
Leo, the original question related to just getting Leo's code
autocompletion system to complete things based on the Blender Python
API, but it expanded into how to integrate Leo and Blender's Python
shell etc.

For typed nodes, Leo sort of addresses these a couple of ways now.
There are directives like @url and @path and @html and so on, which
control how Leo handles a node, and there's the nodes dictionary of
attributes, p.v.u, into which you can stick anything, including
attributes to identify and configure particular node types.  The latter
allows nodes to have multiple types simultaneously, which is handy.

An example would be the todo.py plugin - when that's active a node can
carry attributes which drive the todo tab / pane, making the node into
a todo item, as well as whatever else it is.

Actually subclassing Leo's core node classes is not an approach that's
been used, and might not be all that popular in terms of it's
interaction with unit tests for general node behavior etc.  You could
still use a class hierarchy with inheritance to code controllers for
nodes typed with either of the other two node typing systems.

Cheers -Terry

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