Re: Hello and NodeIterator Revisited

Eric Vasilik wrote:

> What I have done is (when the insertion of the italic takes place) to
> query
> a propery of the iterator (I call it gravity) which has values left
> and
> right.  Iterators with left gravity scoot to the left of any new
> context,
> and iterators with right gravity scoot to the right of any new
> content.  Of
> course, this querying of gravity on iterators only needs to take place
> when
> it is ambiguous as to which way the iterator should go.  This way,
> whoever
> created the iterator can determine the behavior of the iterator in the
>
> presence of a changing document.
>

I agree that some want to scoot left and some right, but in my
experience it is generally relative to other iterator-like invisible
markers, and the order and way in which they were inserted, not in a
constant direction.

In my work, multiple markers that occur at the same position seem to
need a sub-order established relative to each other, and which way each
iterator scoots depends upon which side the inserting marker occurred
on, using the sub-order where the actual position is identical.  A
simple gravity flag does not automatically do the right thing most of
the time without complex gravity switching logic that seems to be
handled more simply by sub-ordering.

Ray Whitmer
ray@corel.com

Received on Wednesday, 6 May 1998 15:07:42 UTC