On Thu, May 13, 2010 at 2:43 PM, Ville M. Vainio <[email protected]> wrote:
> On Thu, May 13, 2010 at 9:11 PM, Terry Brown <[email protected]> wrote:
>
>> But I wonder about the level at which the abstraction occurs.  I think 
>> that's what bugs Ville.  If the gui was responsible for telling leo the body 
>> text for node n is now s, rather than telling leo that key k has just been 
>> pressed, things would be simpler.
>
> Right. In my opinion Leo "knows" too much about the gui. Most of the
> leo should see the editor as a "black box" that contains one string
> per body editor (current contents).

My recent post about encapsulation applies here.

In fact, Leo's design is strong because all of Leo's modules treat
*all* other modules as "black boxes".

- Most of Leo knows *nothing* about Leo commands!
- Leo's commands know *nothing* about the gui!
- The gui knows nothing about Leo's key handling, commands or anything else!

> Same should apply for e.g. minibuffer. It should just "sit there" as
> QLineEdit. If you press "a" in the minibuffer Leo should never know
> about it, it should just result in "a" appearing in the line editor.

I'm sorry, but this is just wrong.  If the minibuffer were nothing but
a QLineEdit, it would lose essential features.  In particular, there
must be a tight integration between k.getArg and the minibuffer, and
between k.getArg and commands that use the minibuffer. It may not be
"pretty" internally, but that can not be helped.  There are a lot of
issues with the minibuffer that are not apparent to the casual user.
That in no way means the code is badly designed or badly coded.
Neither redesign nor refactoring has, imo, has *any* chance of
improving the code.

> In a sense "stickynotes" is a prototype of this, and so is my early Qt
> proof of concept (qleolite).

We've had a prototype of the minibuffer.  It took me at least a year
of work to make it what it is today.

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