Xref: utzoo comp.sys.mac:28901 comp.sys.mac.programmer:5172 Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac,comp.sys.mac.programmer Subject: Re: Editing large (> 32K) files Keywords: TextEdit replacement Message-ID: <12744@dartvax.Dartmouth.EDU> Date: 23 Mar 89 00:24:00 GMT References: <538@phoibos.UUCP> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Followup-To: comp.sys.mac Organization: Thayer School of Engineering Lines: 25 In article <538@phoibos.UUCP> ge@phoibos.UUCP (Ge Weijers) writes: >What is the best way to go when writing a text editor in the Mac that >needs only normal, basic features as style-less TextEdit provides. >The catch is that the editor must be able to edit files that are >quite a bit larger than 32K. I can imagine two approaches: > >- write a simple TextEdit replacement (a lot of work reinventing the wheel) >- try to use multiple TEHandles, a tricky ClickLoop etc. > The first solution is the only way to go. You have to go right down to the QuickDraw level, and reimplement all of the TextEdit stuff, only do it better. This is NOT reinventing the wheel, because there are things missing from TextEdit which you will have to put in your text editor: a) Large files. b) Sensible data structures to hold text in memory. c) The hooks for your specialized application (which is why you are writing it in the first place.) Reading Technical Note # 203, "Don't Abuse the Managers," should convince anyone that TextEdit is not meant for heavy-duty stuff. earleh:xyzzy:32768:7:Earle R. Horton,,,6434109:/hackers/earleh:/bin/rn