Re: NSUndoManager implementing Redo
Re: NSUndoManager implementing Redo
- Subject: Re: NSUndoManager implementing Redo
- From: petite_abeille <email@hidden>
- Date: Fri, 12 Jul 2002 01:55:23 +0200
On Friday, July 12, 2002, at 01:41 , Greg Hulands wrote:
Any help or insight is greatly appreciate.
Here is what I'm doing in a setter method for example:
- (void) setCurrentObject: (id) aValue
{
if ( [aValue isEqual: _currentObject] == NO )
{
if ( _currentObject != nil )
{
NSUndoManager* aManager = [self undoManager];
[aManager beginUndoGrouping];
[aManager setActionName: [_currentObject description]];
[aManager registerUndoWithTarget: self selector:
@selector(displayObject:) object: _currentObject];
[aManager endUndoGrouping];
}
[_currentObject autorelease];
_currentObject = [aValue retain];
}
}
Which method should get called when performing a redo?
In your example: undoAddData.
Can I give the undo
manager a different method?
For "redo"? No. They "both" use the same selector.
PA.
_______________________________________________
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.