PDA

View Full Version : When will prepareWithInvocationTarget: not be self?




grimreaper1377
May 4, 2009, 01:03 PM
Hi,

I'm going through the NSUndoManager tutorial on cocoadev (http://www.cocoadev.com/index.pl?NSUndoManagerTutorial) and it says that the first thing you always need to do is called prepareWithInvocationTarget:self Just a quick question: why is the argument always self? When would it be something else?

Thanks



lee1210
May 5, 2009, 04:19 PM
I know nothing about this, so i didn't reply originally (also, don't bump threads... i feel guilty for responding after a bump)... but all i can really come up with is the documentation for this method:
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSUndoManager_Class/Reference/Reference.html#//apple_ref/occ/instm/NSUndoManager/prepareWithInvocationTarget:

-Lee