Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!agate!shelby!neon!pescadero.Stanford.EDU!philip From: philip@pescadero.Stanford.EDU (Philip Machanick) Newsgroups: comp.sys.mac.programmer Subject: Re: TE changes Message-ID: <1990Aug30.181935.15335@Neon.Stanford.EDU> Date: 30 Aug 90 18:19:35 GMT References: <25932@cs.yale.edu> Sender: news@Neon.Stanford.EDU (USENET News System) Reply-To: philip@pescadero.stanford.edu Organization: Computer Science Department, Stanford University Lines: 17 In article <25932@cs.yale.edu>, tarr-michael@CS.YALE.EDU (michael tarr) writes: > Anyone know how to find out if text in a TE window has changed? I could > check the char count in the struct, but that could be misleading (e.g. > replacing one character wouldn't change it). When your program does something that could result in changing the text, it will usually be obvious whether something will change, e.g., an insert/paste (empty selection) or a delete (with non-empty selection). The only case that's slightly complicated is an insert (or paste) with a non-empty selection, when you need to check if the current selection = what's being inserted. Seems simple - am I missing something? Philip Machanick philip@pescadero.stanford.edu