On Tue, Oct 21, 2008 at 8:28 PM, Edward K. Ream <[EMAIL PROTECTED]> wrote:

> I am dubious about using id(it) as a hash.  When the tree is changing
> it would be so easy to refer to something that looks like a tree item
> but isn't because it has been deallocated.  Boom.
>
> Presumably id(it) was used as a hash because tree items aren't
> hashable.  I'll check this soon...

Nope. I did it because I thought there was a dict lookup problem,
while there really wasn't. Ie it was a misunderstanding on my part.

> Also, deleting a tree isn't as easy as item.takeChildren: the
> leoTkTree dictionaries must be updated or further chaos will happen.

In case they aren't updated automatically when you re-create the child
tree, they can be updated iterating through the old tree normally.

> I haven't given up, but this is turning into a project.

Yeah, so it may be better to focus on other stuff for a second
(choosing the right lexer for nodes, etc). The current performance is
not a usability-killer anyway.

-- 
Ville M. Vainio
http://tinyurl.com/vainio

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