• 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
Cocoa undo considerations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa undo considerations


  • Subject: Cocoa undo considerations
  • From: Raphael Sebbe <email@hidden>
  • Date: Wed, 11 Jul 2001 20:34:21 +0200

Hi all,

I am currently looking into implementing undo support for my app. Perhaps people who are familiar with undo could answer these questions :

- It should be implemented at the model (from MVC) level. Right ?

- NSUndoManager's -setActionName: should be invoked at the controller level, as a single click in the GUI can make 10's of pushes on the undo stack and having the last elementary action name would not make sense; and only the controller knows what the GUI wants to do. Still OK ?

- Again regarding controllers : should those push an extra invocation into the undo manager that tells which part of the GUI will need to redisplay itself on undo ?

- Adding undo/redo to methods modifying objects is pretty straightforward. But when a method removes (delete) an object, this object should not be deallocated but instead stored in a "saved objects" pool (ie, NSMutableArray), so that the invocations stored in the undo manager stay valid. And that pool should be emptied when one wants to get rid of the undo stack. Makes sense ?

- Are there other things to have in mind when implementing undo ?

Many thanks,

Raphael


  • Prev by Date: disabling pulsing default button
  • Next by Date: From View to PICT to Pasteboard
  • Previous by thread: disabling pulsing default button
  • Next by thread: Re: Cocoa undo considerations
  • Index(es):
    • Date
    • Thread