• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Ephemeral Changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ephemeral Changes


  • Subject: Re: Ephemeral Changes
  • From: "Sherm Pendley" <email@hidden>
  • Date: Tue, 25 Mar 2008 23:07:05 -0400

On Tue, Mar 25, 2008 at 10:07 PM, Gerriet M. Denkmann <email@hidden>
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 any other "ephemeral" method. Turn off the undo manager using -
> > disableUndoRegistration, call super, then turn it back on again.
> >
>
> I have to apologize for not stating my problem more clearly. Let's
> try again:
>
> I do want to see "Undo Set Font" or "Redo Paste Font" etc. in my Edit
> menu. So disabling the undo manager is probably not the right thing.


You could override the "epemeral" methods and call [self
updateChangeCount:NSChangeUndone] after calling super. That would leave the
operation on the undo stack, but leave the document's change count, um...
unchanged. :-)

Or, you could keep track of the "real" changes yourself, and override
-isDocumentEdited with your own implementation.

sherm--
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Ephemeral Changes
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >Ephemeral Changes (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Ephemeral Changes (From: Graham Cox <email@hidden>)
 >Re: Ephemeral Changes (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Adding CalendarStore.framework changes managed object model version?
  • Next by Date: Re: outlineViewSelectionDidChange not called
  • Previous by thread: Re: Ephemeral Changes
  • Next by thread: Re: Ephemeral Changes
  • Index(es):
    • Date
    • Thread