• 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: Handling Undo/Redo in KVC To-Many Accessors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling Undo/Redo in KVC To-Many Accessors


  • Subject: Re: Handling Undo/Redo in KVC To-Many Accessors
  • From: Sean Todd <email@hidden>
  • Date: Tue, 11 May 2004 09:31:57 -0500

On May 10, 2004, at 4:43 PM, Chris Giordano wrote:

You could try using the array controller's insertObject:atArrangedObjectIndex: and removeObjectAtArrangedObjectIndex: methods rather than the model's insertObject:inToDosAtIndex: and removeObjectAtIndex: for the undo actions. This should still trigger the model changes, but should also cause to happen all the other magic that makes array controllers so convenient. I don't think I tried that when I was trying to replicate your problem in my code since it really wouldn't fit with my code, but it might work, would involve changing only two lines (other than the one addition), and it's possible you wouldn't have to lose the selection.

I **DID** use the array controller's methods for the undo actions. That's why I believe that this behavior reflects a bug in the framework. Yes, I could understand why it would behave that way if I had use the NSArray methods but I didn't.

Thanks again,

Sean
_______________________________________________
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: 
 >Re: Re: Handling Undo/Redo in KVC To-Many Accessors (From: Sean Todd <email@hidden>)
 >Re: Handling Undo/Redo in KVC To-Many Accessors (From: Chris Giordano <email@hidden>)

  • Prev by Date: GMT offset of Created file date
  • Next by Date: Re: [OFF] ^_^ meay-meay!
  • Previous by thread: Re: Handling Undo/Redo in KVC To-Many Accessors
  • Next by thread: canceling copyTo:toPath:handler
  • Index(es):
    • Date
    • Thread