Re: Ephemeral Changes

2008-03-27 Thread Gerriet M. Denkmann
On 27 Mar 2008, at 14:46, Jens Miltner wrote: Am 27.03.2008 um 11:57 schrieb Gerriet M. Denkmann: On 26 Mar 2008, at 22:56, Graham Cox wrote: The undo manager will directly change the data in the text view using an invocation or target/action - it doesn't go back through changeFont: normal

Re: Ephemeral Changes

2008-03-27 Thread Gerriet M. Denkmann
On 27 Mar 2008, at 09:50, Jens Miltner wrote: Am 26.03.2008 um 11:26 schrieb Gerriet M. Denkmann: I also can use Edit ► Undo Set (or Paste) Font but now the document gets dirty. Very bad. Also: the complete text gets selected. So what else do I have to implement? I tried setFont: and setFo

Re: Ephemeral Changes

2008-03-27 Thread Jens Miltner
Am 27.03.2008 um 11:57 schrieb Gerriet M. Denkmann: On 26 Mar 2008, at 22:56, Graham Cox wrote: The undo manager will directly change the data in the text view using an invocation or target/action - it doesn't go back through changeFont: normally, which is really a "high level" method. May

Re: Ephemeral Changes

2008-03-27 Thread Gerriet M. Denkmann
On 26 Mar 2008, at 22:56, Graham Cox wrote: The undo manager will directly change the data in the text view using an invocation or target/action - it doesn't go back through changeFont: normally, which is really a "high level" method. Maybe the solution to this is to subclass NSUndoManager

Re: Ephemeral Changes

2008-03-27 Thread Jens Miltner
Am 26.03.2008 um 11:26 schrieb Gerriet M. Denkmann: I also can use Edit ► Undo Set (or Paste) Font but now the document gets dirty. Very bad. Also: the complete text gets selected. So what else do I have to implement? I tried setFont: and setFont:range:, but these seem never to be called. H

Re: Ephemeral Changes

2008-03-26 Thread Graham Cox
The undo manager will directly change the data in the text view using an invocation or target/action - it doesn't go back through changeFont: normally, which is really a "high level" method. Maybe the solution to this is to subclass NSUndoManager so that you can hook into the undo and redo

Re: Ephemeral Changes

2008-03-26 Thread Gerriet M. Denkmann
On 26 Mar 2008, at 04:07, Sherm Pendley wrote: On Tue, Mar 25, 2008 at 10:07 PM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: On 25 Mar 2008, at 23:12, Graham Cox wrote: > There may be a simpler way, but this is what occurred to me when I > read this: > > Subclass NSTextView and override -c

Re: Ephemeral Changes

2008-03-25 Thread Sherm Pendley
On Tue, Mar 25, 2008 at 10:07 PM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: > > On 25 Mar 2008, at 23:12, Graham Cox wrote: > > There may be a simpler way, but this is what occurred to me when I > > read this: > > > > Subclass NSTextView and override -changeFont: -changeAttributes: > > and an

Re: Ephemeral Changes

2008-03-25 Thread Gerriet M. Denkmann
On 25 Mar 2008, at 23:12, Graham Cox wrote: There may be a simpler way, but this is what occurred to me when I read this: Subclass NSTextView and override -changeFont: -changeAttributes: and any other "ephemeral" method. Turn off the undo manager using - disableUndoRegistration, call super

Re: Ephemeral Changes

2008-03-25 Thread Graham Cox
There may be a simpler way, but this is what occurred to me when I read this: Subclass NSTextView and override -changeFont: -changeAttributes: and any other "ephemeral" method. Turn off the undo manager using - disableUndoRegistration, call super, then turn it back on again. Be warned I ha