• 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: Linking the "document edited" flag to the Undo menu item state
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking the "document edited" flag to the Undo menu item state


  • Subject: Re: Linking the "document edited" flag to the Undo menu item state
  • From: Graham Cox <email@hidden>
  • Date: Fri, 3 Apr 2009 15:24:50 +1100


On 03/04/2009, at 3:15 PM, Huibert Aalbers wrote:

Wow,

That certainly qualified as a simple solution :-) However, it didn't work. Maybe that is because my application is not document-based.

Any additional suggestions?


Hrrm, well, you didn't actually mention that rather important fact...

Still, never mind, the solution is much the same. If your app isn't document based, it sounds like perhaps there's a disconnect between your undo manager and your window. To ensure this doesn't happen, make sure you return your undo manager using the window delegate's method:

-windowWillReturnUndoManager:

So for example if the window delegate is the main controller that manages the data model and the undo manager, it should just return the undo manager using this method. Then the automatic management of the window 'dirty' flag should work automatically as for doc-based apps.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Linking the "document edited" flag to the Undo menu item state (From: Huibert Aalbers <email@hidden>)
 >Re: Linking the "document edited" flag to the Undo menu item state (From: Graham Cox <email@hidden>)
 >Re: Linking the "document edited" flag to the Undo menu item state (From: Huibert Aalbers <email@hidden>)

  • Prev by Date: Re: NSDate with Format?
  • Next by Date: Re: isnan
  • Previous by thread: Re: Linking the "document edited" flag to the Undo menu item state
  • Next by thread: Re: Linking the "document edited" flag to the Undo menu item state
  • Index(es):
    • Date
    • Thread