> This one should be changed to return an LString rather than a
> character array.
> Also, the implementation should use LString rather than fiddling around
> in a fixed-size array.
ok, i'll switch that. I briefly had it in while trying to figure out
how to pass arguments.
And to make sure: it should return an LString, not a pointer to one?
> The only time where LStrings are slower than char arrays are when they
> are short-lived. In situations where we only use the LString as a
> temporary container for a c-array. This happens only if not all data
> structures are LString, so the solution is to move to LString, rather
> than stay with error-prone C-arrays.
Mine's real short lived, but since this will only come out during
interaction, I suppose that performance is irrelevant, and that
readability & maintainability are far more important.
> Rather than adding a new method Edit(int, int, LString), you should
> just pass the index word to the constructor of the inset.
> Have a look at some of the other insets that do this. I think maybe
> the bibinset does it, try to have a look at that.
whoops, I thought I"d stripped all those out . . . Changing edit taught
me enough about how it worked that I put edit back where it came from,
and unless something went horribly wrong with the patch sent, it works
by using setcontents() before edititng.
I mayh be dense here, but looking at the code, I don't see an option
with the constructor. InsetIndex::InsetIndex takes an LString
argument, and then calls insetcommand(), which doesn't seem to to
anything.
rick
--