• 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
CoreData: How to alter attributes undoably?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreData: How to alter attributes undoably?


  • Subject: CoreData: How to alter attributes undoably?
  • From: Frank Illenberger <email@hidden>
  • Date: Fri, 24 Jun 2005 12:45:39 +0200

Hi,

I want to make a change to some attribute in an NSManagedObject that should not be undone when the user presses the undo key. Normally, I am used to call disableUndoRegistration on the MOC's NSUndoManager before making the change and enableUndoRegistration after it. But this does not work with CoreData. Even the following procedure still allows the user to undo the change:

NSManagedObjectContext *moc = [self managedObjectContext];
[moc processPendingChanges];
[[moc undoManager] disableUndoRegistration];

[self setSomeAttribute:@"Some Value"];

[moc processPendingChanges];
[[moc undoManager] enableUndoRegistration];


Is there a way to achieve the desired behaviour?


Cheers


Frank

_______________________________________________
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: CoreData: How to alter attributes undoably?
      • From: Lee Morgan <email@hidden>
  • Prev by Date: Core Data Multiple User question
  • Next by Date: Re: NSTableView row height calculation
  • Previous by thread: Re: Core Data Multiple User question
  • Next by thread: Re: CoreData: How to alter attributes undoably?
  • Index(es):
    • Date
    • Thread