Juergen Vigna <[EMAIL PROTECTED]> writes:
| On 05-Jul-2001 Lars Gullik Bjønnes wrote:
| > Juergen Vigna <[EMAIL PROTECTED]> writes:
| >
| >| As already told I fixed the showstopper and now this new Undo should work
| >| properly! Please test it an let me know!
| >
| >
| > @@ -52,6 +52,8 @@ LyXText::LyXText(BufferView * bv)
| > {
| > bv_owner = bv;
| > inset_owner = 0;
| > +#warning We should activate the below line!!! (Jug)
| > +// bv->text = this;
| > init();
| > }
| >
| > No we probably should not.
| > We should let the bufferview take care of that... and it already does.
|
| Well I wouldn't write that if I wouldn't be pretty sure it's needed :),
| but anyway for now I found a roundabout so it is not needed. But just
| for you to know, have a look at all the functions which are called when
| you initialize a LyXText at some point a inset->update() is called which
| could refer to bv->text which at that moment is not yet set (well it
| segfaulted here!)
Perhaps the constructor should do less then...
| So we have 3 possible solutions for this:
|
| 1. Set the above
|
| 2. In all functions we access bv->text do (if bv->text then bv->text->whatever)
No, an assert would be the correct thing. We _require_ the bv arg to
be present.
| 3. Have the paragraph initialized with a second call so we do:
|
| text = new LyXText(this)
| text->init(buffer()->firstParagraph())
yes.
| Where the last one would seem the best of all three, but 1. is true too so
| why bother with 3. if we know we have to do 1. anyway?
LyXText should not much with the bufferviews variables.
--
Lgb