Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.milw.wisc.edu!lll-winken!ames!haven!decuac!shlump.nac.dec.com!mountn.dec.com!minow From: minow@mountn.dec.com (Martin Minow) Newsgroups: comp.sys.mac.programmer Subject: Re: TextEdit as a paragraph engine Message-ID: <583@mountn.dec.com> Date: 11 Aug 89 20:21:27 GMT References: <28299@watmath.waterloo.edu> Reply-To: minow@mountn.UUCP (Martin Minow) Distribution: na Organization: Digital Equipment Corporation Lines: 31 In article <28299@watmath.waterloo.edu> gjditchfield@watmsg.waterloo.edu (Glen Ditchfield) writes: > >I've heard suggestions that, if plain TextEdit is too simple for your >editing needs, then somewhat fancier editors can be built by using TextEdit >as a "paragraph engine". TextEdit has a number of internal values stored as signed 16-bit integers. This limits it to 32K bytes of data and (because there are pixel positions also stored in 16-bit Points) about 2000 lines (32K / 16 pixel/line). (This is explained in a recent Inside Mac). There is also a limit to the length of a line due to the 16-bit limit. If you are willing to position paragraphs on the screen, and do a lot of the scrolling effort yourself, and not allow text selections to extend beyond one paragraph, you could "probably" create a separate TextEdit record for each paragraph of your data. It's a lot of work, though. You could even create a TextEdit record for the window, adding and removing chunks of text from the edit record as lines scroll in and out of the screen. Of course, with huge screens and tiny fonts, you may still exceed TextEdit's limitations. I've written a TextEdit replacement (coming to MacTutor in the near future) that doesn't have this limitation. (It doesn't do styles or ScriptManager stuff either.) It took me about a month of evenings to get it working. (No, I won't post it to the net before the MacTutor article is published.) Martin Minow minow%thundr.dec@decwrl.dec.com