• 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 14:38:46 +0200

On Friday, July 12, 2002, at 02:14 , Greg Hulands wrote:

If you have a storage of objects that hold the data and you allow the user
to delete "records", you have to be able to reinsert them into the array and
reperform any checks.

So you have

Ummm... I still don't get it :-( You mean you simply want to register multiple action for an undo, eg:

[NSUndoManager beginUndoGrouping]

[NSUndoManager registerUndoWithTarget: bla selector: @bla object: bla]
[NSUndoManager registerUndoWithTarget: blaselector: @blabla object: blabla]

[NSUndoManager endUndoGrouping]

Is it what you are talking about? One way, or the other, registerUndoWithTarget has only one selector as there is no technical differences between undo/redo...

On the other hand, if you are simply talking about adding object to an array or something, why not simply follow this "convention"? Eg:

- (NSMutableArray) departements;

- (void) addToDepartements: (id) aValue
{
[NSUndoManager registerUndoWithTarget: self selector: @removeFromDepartements object: aValue]
}

- (void) removeFromDepartements: (id) aValue
{
[NSUndoManager registerUndoWithTarget: self selector: @addToDepartements object: aValue]
}

Cheers,

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: Bill Cheeseman <email@hidden>
References: 
 >Re: NSUndoManager implementing Redo (From: Greg Hulands <email@hidden>)

  • Prev by Date: Re: NSUndoManager implementing Redo
  • Next by Date: OmniGraffle & ProjectBuilder
  • Previous by thread: Re: NSUndoManager implementing Redo
  • Next by thread: Re: NSUndoManager implementing Redo
  • Index(es):
    • Date
    • Thread