Path: utzoo!attcan!uunet!samsung!usc!apple!anderson From: anderson@Apple.COM (Clark Anderson) Newsgroups: comp.sys.mac.programmer Subject: Re: TextEdit 32K limit. Keywords: text edit textedit 32K limit pounding head against wall Message-ID: <41967@apple.Apple.COM> Date: 15 Jun 90 18:25:30 GMT References: <334@caslon.cs.arizona.edu> Organization: Apple Computer Inc, Cupertino, CA Lines: 42 I wrote a set of routines that helps surpass the 32K limit. It was a pain in the neck, too. I would love to give you the source, because I am full aware of the frustration you're dealing with, but since it belongs to Apple, I can't do that. If it was my code, I'd mail it to you in a flash... What you might try is this: 1) Have a single TERec. This rec hold the text that the user is currently looking at. 2) Create 2 10K buffers, one to hold the text immediately before and immediately after the text in the TERec. The TERec only holds 10K at a time. This allows the TE routines to run fairly fast, since they only deal with 10K at a time. Unfortunately, this limits pasting to 20K, but you can't have everything... 3) As the user scrolls thru the text, you swap blocks of text in and out of the TERec. The tricky part is adjusting the scroll bars...I worked on it for days, but it can be done. It can probably be done quicker, too, since I'm not an expert programmer. 4) You have to deal with little irritations like breaking the buffers at even lines, so half lines aren't coming up next, and things like that. 4) When it runs, it does run NICE. Another alternative is to get the ThinkC libraries called Capp's Construction Set. They have routines that bypass the 32K limit on TextEdit. Good luck. I hope this helps. --clark -- ----------------------------------------------------------- Clark Anderson InterNet: anderson@apple.com CPU Engineering AppleLink: C.ANDERSON Apple Computer, Inc BellNet: 408-974-4593 "I speak only for myself, much to my employer's relief..." -------------------------------------------------------------