Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!isle From: isle@eleazar.dartmouth.edu (Ken Hancock) Newsgroups: comp.sys.mac.programmer Subject: Re: How do I undo style changes in the new TextEdit Message-ID: <15829@dartvax.Dartmouth.EDU> Date: 26 Sep 89 17:37:42 GMT References: <15772@dartvax.Dartmouth.EDU> Sender: news@dartvax.Dartmouth.EDU Reply-To: isle@eleazar.dartmouth.edu (Ken Hancock) Organization: Computer Resource Center, Dartmouth College Lines: 23 In article <15772@dartvax.Dartmouth.EDU> ari@eleazar.dartmouth.edu (Ari Halberstadt) writes: :Here's my problem: :I'm trying to implement the undo feature for the new styled TextEdit. :The way I'd go about it is to save a copy of the text's style handle, :and then apply the new style. To undo the change, I'd simply apply :the saved style handle (for the whole text). However, after :reading through IM-V, I still can't figure out how to get a *copy* :of the style record. Note that making a complete copy of all the :text is unacceptable. There just doesn't seem to be a call :to copy the whole style record at once. Use the routines GetStyleScrap and SetStyleScrap. Note that the former is documented in IM V, but the later is incorrectly documented in one of the technotes (207 I think...). Ken -- Ken Hancock '90 | E-mail: (BITNET/UUCP/INTERNET) Computer Resource Center Consultant | isle@eleazar.dartmouth.edu -------------------------------------+-------------------------------------- DISCLAIMER? I don't get paid enough to worry about disclaimers.