[comp.sys.mac.programmer] Question About TEInsert

jsills@trc.amoco.com (Sills) (12/19/90)

I am having system crashes associated with the TextEdit toolbox.
I took the sample tiny editor from Think C4.0, on system 6.0.2, and
added a segment which writes to the window using TEInsert
with a string pointer in the argument list.
When I return to the main loop and resize the window using the
grow box, the program bombs because the TEHandle
value changes (seen in Think C Debugger).
I changed the segment to write to the screen using TEKey instead,
with one character of the pointer at a time, and everything is OK.
Obviously, this is happening due to heap compression while
resizing, but there is no difference in the TEHandle by the
time I get back to the window handler, is there?
What am I doing wrong with that pointer?


jsills@trc.amoco.com