• 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 in non-NSDocument Cocoa Applications: unable to change 'Undo' menu item name.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUndoManager in non-NSDocument Cocoa Applications: unable to change 'Undo' menu item name.


  • Subject: Re: NSUndoManager in non-NSDocument Cocoa Applications: unable to change 'Undo' menu item name.
  • From: James DiPalma <email@hidden>
  • Date: Thu, 17 Jun 2004 00:54:48 -0700

On Jun 16, 2004, at 3:17 PM, Nick Zitzmann wrote:
On Jun 16, 2004, at 3:26 PM, Frederick C. Lee wrote:
However, I'm not using NSDocument in my appl so I have to create an
'undoManager' instance within the following paradigm:

Actually, you don't. Each responder has its own undo manager, so you can get the undo manager from the first responder or whatever object. Then you can interact with that undo manager, and if the object is the first responder, then you'll see the changes in the Edit menu.

NSResponder has an -undoManager method, but it does not have its own undo manager, nor does it handle undo:, so it won't be a target for an undo: action. All Cocoa framework views will return their window's undo manager which is either established somewhere when using NSDocument, or is created by that window.

If you have your own NSResponder subclass (an NSView maybe) then it can do whatever it wants.


-jim
_______________________________________________
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.


References: 
 >NSUndoManager in non-NSDocument Cocoa Applications: unable to change 'Undo' menu item name. (From: "Frederick C. Lee" <email@hidden>)
 >Re: NSUndoManager in non-NSDocument Cocoa Applications: unable to change 'Undo' menu item name. (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: PMSessionSetDestination 3 results?
  • Next by Date: Re: Releasing memory
  • Previous by thread: Re: NSUndoManager in non-NSDocument Cocoa Applications: unable to change 'Undo' menu item name.
  • Next by thread: Re: NSUndoManager in non-NSDocument Cocoa Applications: unable to change 'Undo' menu item name.
  • Index(es):
    • Date
    • Thread