Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: More than 32k into a TextEdit window? Message-ID: <15584@dartvax.Dartmouth.EDU> Date: 15 Sep 89 00:29:45 GMT References: <10417@phoenix.Princeton.EDU> <15574@dartvax.Dartmouth.EDU> <3956@ncsuvx.ncsu.edu> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Thayer School of Engineering Lines: 42 In article <3956@ncsuvx.ncsu.edu> jnh@ecemwl.UUCP (Joseph N. Hall) writes: >In article <15574@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu > (Earle R. Horton) writes: >>In article <10417@phoenix.Princeton.EDU> bskendig@phoenix.Princeton.EDU >> (Brian Kendig) writes: >>>How do I get more than 32k into a TextEdit window? ... >ERH suggests using a linked list of handles for line-oriented text records. >This is the easier approach if what you want is a WYSIWYG editor with fancy >formatting capabilities, but on the other hand if you want just a text >editor, the "big blob" of text approach is somewhat easier to implement. The "big blob" approach will break down performance-wise once your text exceeds a few tens of kilobytes in size, maybe less. Since the point is to get more than 32k, this seems like a bad choice to me. Another approach is the "sectioned blob," a block of text with a hole or two in the middle. This should be only somewhat more difficult than the "big blob," but should afford acceptable performance if done right. The whole point of the Technote I quoted is that you will not get good performance with large text documents if you use TextEdit or anything like it. >If I'm not mistaken, source code to two of these editors, MacJove and >MicroEmacs (both of which are sort of emacs clones), is available. I don't >remember from where, exactly. The display, editing, scrolling, etc., code >from one of these may prove edifying. I mailed the MicroEmacs source code to sumex a few days ago. It has most of the stuff you will need except for multiple window support and hilighted selected ranges. It's not reentrant, either. With some heavy massaging, and a couple thousand more lines of C code, it might do what you want. My own feeling on this matter is that it would not be conceptually difficult to implement a general high-performance text handling package for the Macintosh. It would, however, take some time to produce anything that is as easy to use as TextEdit and robust enough to handle large blocks of text. Sadly, the amount of time involved significantly reduces the possibility that anyone is going to give something like this away. Earle R. Horton