Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!caen!ox.com!tbomb.ice.com!time From: time@tbomb.ice.com (Tim Endres) Newsgroups: comp.sys.mac.programmer Subject: Re: Why doesn't TEUpdate do an update? Message-ID: <1CE00001.18ffsf@tbomb.ice.com> Date: 8 Dec 90 13:56:16 GMT Reply-To: time@tbomb.ice.com Organization: ICE Engineering, Inc. Lines: 23 X-Mailer: uAccess - Mac Release: 1.0.3 In article <22039@well.sf.ca.us>, oster@well.sf.ca.us (David Phillip Oster) writes: > >Something else wierd. I set the teLength field of my edit record to > >the length of the text in the hText field > NO! Don't ever do this. TE guarantees that (**te).teLength == > GetHandleSize((**te).hText). You should NEVER explicitly change (**te).teLength > This is simply not true. IM states very clearly that one may modify the teLength and hText fields. The catch is that you *must* call TECalText() before performing any further operations with the TEHandle. There is a one sentence indication on IM Vol I page 378. There is the reference to TECalText() on page 382. Set the two fields in question, then call TECalText(), then InvalRect(), then TEUpdate() and things should work. tim. ------------------------------------------------------------- Tim Endres | time@ice.com ICE Engineering | uupsi!ice.com!time 8840 Main Street | Whitmore Lake MI. 48189 | (313) 449 8288