Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!mit-eddie!genrad!decvax!dartvax!eleazar.dartmouth.edu!ari From: ari@eleazar.dartmouth.edu (Ari Halberstadt) Newsgroups: comp.sys.mac.programmer Subject: How do I undo style changes in the new TextEdit Summary: request for method to extract a copy of a style record Message-ID: <15772@dartvax.Dartmouth.EDU> Date: 25 Sep 89 17:16:43 GMT Sender: news@dartvax.Dartmouth.EDU Reply-To: ari@eleazar.dartmouth.edu (Ari Halberstadt) Organization: Dartmouth College, Hanover, NH Lines: 24 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. A similar problem, which could be solved the same way as the above problem, is switching style records for a text edit record. For instance, having 3 versions of a style for the text, and depending on the user's choice, applying those style records. You can email directly to me, and I promise I'll eventually get around to summarizing. The solution I use will be properly acknowledged in my code. -- -- Ari Halberstadt '91, "Long live succinct signatures" E-mail: ari@eleazar.dartmouth.edu Disclaimer: "Live Free or Die"