On Sun, Aug 29, 2010 at 6:04 AM, Ville M. Vainio <[email protected]> wrote:

> I don't think GUI independence should be a part of Leo's core. It's
> guilty for lots of complications in Leo's codebase.

I'm not so sure about this.  There are some "new" hacks in the
selection logic added to support Qt.  It's not clear that the "old"
selection logic really contributed any additional complexity to the
code.

I know you and I disagree slightly about the proper way to write Leo's
Qt gui code, but I'm almost completely sure that the complexity is
inherent and not an artifact of my lack of understanding.  The problem
is very hard: Leo's Qt gui code has to respond to events both from the
user and from Leo's core.

In particular, the "new" hacks arise because Qt headlines (QLineEdit)
have limited lifetimes.  Leo did not create this "infelicity", but Leo
has to deal with it.

> Complicated code is not just a problem for Edwards - it's also a
> hurdle for everybody who is considering contributing to the project,
> or just studying the code. If you kill a constraining requirement, you
> enable aggressive simplifications throughout the whole project.

I agree in principle, but the "constraining requirement" in this case
is that we must be able to drive the Qt gui code from Leo scripts.
That's non-negotiable.

Furthermore, aside for the always-horrible node-switching logic, I do
not believe Leo's core is all that difficult to understand.  Rather
than writing to native Tk or Qt methods, one writes to the wrapper
class methods.  Those methods are easy to use, and the wrappers often
provide good places to hide details.

> GUI independence is necessary if it enables cross platform deployment.
> Tk doesn't increase the amount of platforms Leo can run on.

True.  As I implied earlier, I myself would be happy to drop Tk, but I
see no real benefit from doing so.  Those, like Victor, who are using
Tk "mostly happily" should be able to do so.  They won't be able to
use Python 3k, but that's their concern.

But there *is* a real benefit in "hiding" the Tk gui in the docs for newbies.

Edward

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