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

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.

  • Follow-Ups:
    • Re: NSUndoManager implementing Redo
      • From: Greg Hulands <email@hidden>
References: 
 >NSUndoManager implementing Redo (From: Greg Hulands <email@hidden>)

  • Prev by Date: NSUndoManager implementing Redo
  • Next by Date: objc wrapper for sysctl() and/or kvm_getprocs()?
  • Previous by thread: NSUndoManager implementing Redo
  • Next by thread: Re: NSUndoManager implementing Redo
  • Index(es):
    • Date
    • Thread