On Wed, Nov 22, 2006 at 01:02:26PM +0100, Abdelrazak Younes wrote:
> I have a question for those who knows:
> 
> Why is it that we use LCursor::goUpDown() to go down within a formula? 
> Logically, we should know where we are within the formula and we should 
> be able to descend inside the formula using that information.

And that conclusion is wrong. Making up/down movement in a formula feel
right is far from trivial. It's more or less straightworward to
implemnet a few structure based rules, but it just does not feel right.
I tried several times and current mathed is about the best I could come
up with (i.e. some funny mix of structure based and coordinate based
movement).

This is hard to explain in general. Think of a 2-row-table

   b|\frac{c}{d} 

   x

(Cursor at '|') User presses <Down>.  Should the result be

  b\frac{c}{|d}

  x|

or

  b\frac{c}{|d}

  x

? Both feel wrong in some situations.

> There should be no need to use screen oriented information at all
> within a formula.

I was fan of this theory for quite some time, too.

The probelm is that people expect <Up>+<Down> and <Down>+<Up> be
essentially no-ops. You don't get this with a structure based approach
as there is no 1:1 mapping from the set of positions to the set of
positions 'that are "below" some other position' (and I am not talking
about boundary effects).

Well, you could just try to implement a pure structure based apporach.
That's not too hard to do (in fact this is about ripping out all coord
based stuff from the current solution) and look how it feels.

Andre'

Reply via email to