• 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
NSDocument override Undo's default handling of changes count
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDocument override Undo's default handling of changes count


  • Subject: NSDocument override Undo's default handling of changes count
  • From: Ernesto Giannotta <email@hidden>
  • Date: Mon, 1 Feb 2010 11:27:52 +0100

Hello list,

I'm using NSDocument default undoManager but want to override it's change counting behaviour
(I want the black modifed dot to not show when some minor changes are done, but still have them undoable)

I've discovered it's internally handled by these methods observing the undoManager's notifications:

- (void) _changeWasDone: (NSNotification *)notification

- (void) _changeWasUndone: (NSNotification *)notification

- (void) _changeWasRedone: (NSNotification *)notification

I can hack these just fine by overriding them in my NSDocument subclass but I feel uncomfortable with that
(and with those compiler warnings obviously thrown by XCode)

I've also tried to intercept the undoManager's notifications
which I can do but can't find a way to prevent them from propagating to the default handlers


Am I missing something or should I implement my own undoManager just to handle this minor tweak?


Thanks for listening.


Cool Runnings,
Erne.

_______________________________________________

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: NSDocument override Undo's default handling of changes count
      • From: Jeffrey Oleander <email@hidden>
    • Re: NSDocument override Undo's default handling of changes count
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Why can't I use any object as a key in a dictionary?
  • Next by Date: Re: NSDocument override Undo's default handling of changes count
  • Previous by thread: Re: Crash in NSControl's sizeToFit
  • Next by thread: Re: NSDocument override Undo's default handling of changes count
  • Index(es):
    • Date
    • Thread