• 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: Out-of-order Undos and NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Out-of-order Undos and NSTextField


  • Subject: Re: Out-of-order Undos and NSTextField
  • From: James Bucanek <email@hidden>
  • Date: Sun, 9 Jul 2006 16:32:26 -0700

James Bucanek wrote on Saturday, July 8, 2006:

>How do I get these to operate in the correct order? Do I have multiple Undo
>managers at work here? How can I coordinate them or use just one?

Just to follow up on my own post, the NSUndoManager returned by the NSTextField and the document are the same, so I don't have two conflicting undo stacks.

I've checked that -[NSUndoMaanager groupsByEvents] returns YES, so every pass through the event loop *should* result in a distinct top-level undo group.

So how/why can a registered undo action that occured *after* the text field was edited get put in the undo stack *before* the text field changes?

I'm really confused.

James

P.S. I also tried creating a sub-class of NSTextField that returned nil for -[NSResponder undoManager], but that just caused all kinds of problems.

P.P.S. I also tried putting my undo actions together in a group, but that didn't make any difference.

--
James Bucanek
 _______________________________________________
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

References: 
 >Out-of-order Undos and NSTextField (From: James Bucanek <email@hidden>)

  • Prev by Date: How to properly add a document with -addDocument
  • Next by Date: Re: NSCell mouse tracking best practices.
  • Previous by thread: Out-of-order Undos and NSTextField
  • Next by thread: Re: Out-of-order Undos and NSTextField
  • Index(es):
    • Date
    • Thread