On Fri, Mar 15, 2002 at 01:39:27PM +0100, Asger K. Alstrup Nielsen wrote:
> Some insets need access to this information, primarily because
> they reference it.

The necessary information can be passed down as function argument to those
functions that need it. The inset does not have to store it permanently.

> Therefore, these insets logically should know about the  buffer. They are
> defined by the pair of their own internal  state, and the other stuff
> they reference in a buffer.
> 
> In other words, you *will* have to by pointer shuffling if such an inset
> is moved around.

Not when the inset does not contain any such pointer.

> Therefore, I'm inclined to think that insets *should* know
> about their buffer. I believe this will make many things
> simpler.

I obviously believe the contrary.
 
> The discussion is a discussion about whether it is hard
> to keep back links alive in a tree. Come on, it is not.
> This is stuff from the first page in the data structure
> book.

It's not too hard in a single tree. The fun start when stuff like undo/redo
comes into play. Then suddenly you have paragraphs that are somewhat equal
but not really, and stuff like that.

If getting it right were easy with the current structure why has nobody
managed to do it during the last seven years or so? I still get most LyX
crashes in situations that look like some pointers went south (apart from
the obvious mistakes during development of course)...

Andre'

-- 
André Pönitz .............................................. [EMAIL PROTECTED]

Reply via email to