Skip to main content
Participant
November 14, 2007
Question

TextModel Replace Text Crashing InDesign CS3

  • November 14, 2007
  • 3 replies
  • 349 views
Hi,

i'm using textModel->Replace(range.Start(& ml), result.Length(), &result) to replace text.

it works great with short text but when there's alot of text, inDesign crashes..
have also tried with Delete() then Insert() but that crashes also..

does anyone know how to fix this?

thanks!
This topic has been closed for replies.

3 replies

Participant
November 16, 2007
fixed by replacing the text in smaller chunks :D
Participant
November 15, 2007
hi dirk!
thanks for the reply

i've tried itextmodelcmd with iCommand to replace the text and it still crashed with big text (length:1000+)

have also tried to use applescript to replace the text and that crashed also

kinda running out of ideas..
Inspiring
November 14, 2007
Read the programming guide about persistence and commands.
In general you should not invoke methods yourself that smell like they could change the document (or book or library or preference).

To your rescue, see docs/references/sdkdocs/html/classITextModelCmds.html

Dirk