Path: utzoo!mnetor!uunet!tektronix!tekig5!tekig4!gregr From: gregr@tekig4.TEK.COM (Greg Rogers) Newsgroups: comp.sys.mac Subject: Help! TextEdit Programming Problem - "nLines" Message-ID: <2653@tekig4.TEK.COM> Date: 29 Mar 88 07:44:14 GMT References: <18317@think.UUCP> Reply-To: gregr@tekig4.UUCP (Greg Rogers) Organization: Tektronix, Inc., Beaverton, OR. Lines: 18 Can any Mac wizard shed some light on a programming problem I'm having? My edit record (TERec) seems to completely loose track of the number of lines of text as I'm adding characters to the text. In other words TERec.nLines jumps ahead by hundreds of lines as I add characters using TEInsert. The number of lines that nLines jumps by doesn't seem to follow any pattern. Line after line of text is inserted properly and then out of the blue, nLines jumps. This seems to occur after a carriage return ($0D) is inserted, but only infrequently. I also follow TEInsert with TEScroll after each ($0D) is inserted but this seems unrelated. Calling TECalText fixes the edit record with nLines returning to normal, and all characters intact. Is there some bug related to carriage returns and TEInsert or TEScroll in these toolbox routines? I would really appreciate any information as I can't find any explaination for this behavior. Thanks, Greg Rogers