• 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: Newbie UndoManager question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie UndoManager question


  • Subject: Re: Newbie UndoManager question
  • From: "John C. Randolph" <email@hidden>
  • Date: Wed, 22 Sep 2004 17:08:53 -0700


On Sep 22, 2004, at 5:02 PM, E. Wing wrote:

I need to build an application with multiple windows. I've looked at
the multiple Window example in
/Developer/Examples. I would like to know, how do I set up Undo for
multiple windows? I have the Cocoa Programming book by Hillegass.
Following that book, I am able to setup undo for a single window. But
when I tried extending the idea to two windows, I am unable to undo
anything in the second window (the menu is greyed out). Only when the
first window is in focus is when I can select undo from the menu, but
it actually doesn't do anything.

To start with, I have two windows. The first is just a launcher that
opens a second window. The second window has a NSTableView which I
want to apply undo to. Ultimately, I would like to add more stuff to
the first window which will also need undo. And I may want a 3rd
window at some point in the future.

Can anybody fill me in on what I need to do, or point me to some
example code that does this?
There's a separate undo manager per window, and that's by design.  The idea is that UI interaction should only affect the window that has the input focus.  (Unless you have multiple windows presenting the same data, in which case the changes in the focused window should just propagate to the other windows.)

What is it that you're trying to do?

-jcr




John C. Randolph <email@hidden> (408) 974-8819 Sr. Cocoa Software Engineer, Apple Worldwide Developer Relations http://developer.apple.com/cocoa/index.html


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Newbie UndoManager question
      • From: "E. Wing" <email@hidden>
References: 
 >Newbie UndoManager question (From: "E. Wing" <email@hidden>)

  • Prev by Date: Re: NSImage origin
  • Next by Date: Re: Newbie UndoManager question
  • Previous by thread: Newbie UndoManager question
  • Next by thread: Re: Newbie UndoManager question
  • Index(es):
    • Date
    • Thread