[FIX] TextStreamFix ([er] questions)

Andreas Raab andreas.raab at gmx.de
Sun Jun 8 20:46:54 UTC 2003


> > Text has also an in-place replacement method. It is
> > replaceFrom: start to: stop with: replacement startingAt: repStart
> I know. Since #replaceFrom:to:with: is supposed to be destructive, I'm
> saying that instead of working around it, by using the lower level
> #replaceFrom:to:with:startingAt: it might be better to fix
> #replaceFrom:to:with: to be destructive,

Uh, ah. Been there, tried that. Didn't work (last time I tried ;-)

The problem is that there are various places in the system where Text
instances are shared (most notably between models/morphs/paragraphs/editors)
and if any of those use the destructive version your system's going to do
really badly.

If you want to fix #replaceFrom:to:with: then you first need to fix those
places.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list