• 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: ChangeCount for Multiple Undo Managers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ChangeCount for Multiple Undo Managers


  • Subject: Re: ChangeCount for Multiple Undo Managers
  • From: Gordon Apple <email@hidden>
  • Date: Wed, 30 Dec 2009 13:55:47 -0600
  • Thread-topic: ChangeCount for Multiple Undo Managers

Ah!  That's what I missed.  Thanks. I assume that just tests the zero state
of changeCount.  Maybe I can override that to return YES if any count is
non-zero.

This is a fairly complex document, involving a data hierarchy and various
contexts (and editable windows) within that hierarchy.  Some of the contexts
operate at different levels within the hierarchy.  With a single undo
manager, I found that it was easy to confuse the undo process and crash it,
not to mention the possibility of applying undo to data not visible on the
screen at the time.  I solved some of the problems by clearing the undo
stack when the user changed tab-views in the hierarchy.  However, with other
windows independently displaying some of the content of the hierarchy, it
simply proved unworkable to use a single undo manager.


On 12/30/09 12:55 PM, "Mike Abdullah" <email@hidden> wrote:

> I am surprised you actually need more than one undo manager for the document,
> but will trust that this is the case. The only way that I am aware of to get
> the behaviour you want is going to be writing your own version of the change
> count system that handles multiple stacks. i.e. maintain several change count
> values internally, and override -isDocumentEdited to go by that.



_______________________________________________

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: 
 >Re: ChangeCount for Multiple Undo Managers (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: Knowing mouse pressed time?
  • Next by Date: Re: Core Data Bindings: NSFaultingMutableSet...addObserver...notSupported
  • Previous by thread: Re: ChangeCount for Multiple Undo Managers
  • Next by thread: Displaying contents of more than one NSManagedObjectContext?
  • Index(es):
    • Date
    • Thread