• 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: UndoManager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: UndoManager


  • Subject: RE: UndoManager
  • From: Jeff Knee <email@hidden>
  • Date: Fri, 15 Nov 2002 10:17:55 -0500

Craig,

On Thursday, November 14, 2002, at 09:47 PM, email@hidden wrote:

I think I understand how to register the selector and
object with the NSUndoManager, yet in the Sketch.app I see this-

[snipped code]

This brings up many questions in my average IQ type head, firstly I
can't find the instance or function definition of undoManager that
[self undoManager] , so is this an inherited method?

Yes, it comes from inheritance:

@interface SKTDrawDocument : NSDocument

NSDocument has an undoManager method.

I am assuming that
[self undoManager] is a getter. I mean, it has to be. So, were is the
get, in NSDocument?

Also, I am trying to make the distinction between [[undoMangager
prepareWithInvocationTarget: self] someMethod: ], and [undoManager
registerUndoWithTarget: self selector:@selector( ) object: ]; Both
of these methods need to register the state that the object was in
before the edit, cut, copy, or paste occured, right? So, what is the
difference?

Take a peek at the docs at:
file:///Developer/Documentation/Cocoa/TasksAndConcepts/ ProgrammingTopics/UndoArchitecture/Tasks/RegisteringUndo.html

Try re-writing one of them to use the undoManager method that it isn't using...

+= Jeff Knee
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Interface/usability question
  • Next by Date: Termination status
  • Previous by thread: Re: UndoManager
  • Next by thread: How does Cocoa implement delegate/callback?
  • Index(es):
    • Date
    • Thread