Adding slots to the classes in leoNodes.py has created some temporary 
problems. Fixing these problems has improved Leo, as I shall now explain.

*Injecting the "mo" attribute into Positions*

PR #2016 <https://github.com/leo-editor/leo-editor/pull/2016> fixes #2012 
<https://github.com/leo-editor/leo-editor/issues/2012>: crash in 
quicksearch.py. The new code is in devel. The Nav pane works again.

The fix was to remove an "unauthorized" injection of the "mo" attribute 
into positions. Apparently, no code ever used the "mo" attribute! 
Furthermore, the PosList class also injected the "mo" attribute, but no 
code ever used it.

*The threadutil.py plugin*

PR #2014 <https://github.com/leo-editor/leo-editor/pull/2014> fixes #2013 
<https://github.com/leo-editor/leo-editor/issues/2013>, hard crashes in 
threadutil.py. The new code is in devel. It no longer seems possible for 
threadutil.py to hard crash Leo.

*p.pluginDict probably isn't needed*

#2015 <https://github.com/leo-editor/leo-editor/issues/2015> suggests 
adding a "pluginDict" ivar to the Position class, to provide a *controlled* 
way of extending positions. My present opinion is that such an extension 
mechanism isn't needed. My opinion might change as I look into #2011 
<https://github.com/leo-editor/leo-editor/issues/2011>. We shall see.

*Summary*

Slots make it impossible to inject attributes into classes. Imo, this is a 
very good thing. 

Slots have revealed weird cruft. Indirectly, slot-related hard crashes have 
strengthened the threadutil plugin.

I suspect that #2015 won't happen.  I'll know for sure later today or 
tomorrow.

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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b9801df4-92c9-42e0-bb4d-9b680d231e5an%40googlegroups.com.

Reply via email to