Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!gf0c+
From: gf0c+@andrew.cmu.edu (Gregory S. Fox)
Newsgroups: comp.sys.mac.programmer
Subject: Re: TextEdit as a paragraph engine
Message-ID: 
Date: 16 Aug 89 14:03:53 GMT
Organization: Humanities and Social Sciences, Carnegie Mellon, Pittsburgh, PA
Lines: 37

On 11 Aug 89, gjditchfield@watmsg.waterloo.edu (Glen Ditchfield) asks:

> 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".  I haven't heard any details.  Would anyone here
> like to explain, ramble, froth, or otherwise expand on this topic?

Yes.  Don't do it.  It seems really tempting, but you can do better on your
own. Initially, it seemed to me that what you describe could be done-  I was
going to create multiple text handles and two TE records and write
specialized scrolling and clikloops to cross the boundries.  I figured by
keeping the text blocks small, TE wouldn't be too dreadfully slow.  But
there's a problem if one of the records doesn't fill the screen.  The
alternative was, as you say, to keep a central record and copy text in and
out.  Either path is rife with limitations. The biggest problem are the
boundries between chunks of text, esp. if the user is working right at a
break.  You have to call TECalText whenever you swap in, which slows you
down, unless you maintain the line table yourself.

There is more grief to be had, but it's mostly faded from my memory.  I am
also working on a TextEdit replacement.  Most of the calls should be very
similar to TE.  It will handle styles, though probably not the
ScriptManager, and I will post it when I'm satisfied it's working.

Using the Text Manager for > 32k editing is a good example of sunk cost.
You figure, "Hey, there's all this stuff already done.  I'll put in a little
effort patching things together."  But the cost-benefit just isn't there.
The big advantage of doing it yourself is that you've got control over
everything, and you can add whatever whizzy features you like  [eg- PICTs],
instead of constantly discovering new limitations.

My advise to you is to stay away from TE as a serious editor.  Like the Tech
Note says-  it's not a word processor.

--Greg
gf0c@andrew.cmu.edu
Mac II Project programmer