• 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
Core Data <--> NSArrayController sync{spam?}
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data <--> NSArrayController sync{spam?}


  • Subject: Core Data <--> NSArrayController sync{spam?}
  • From: "Frederick C. Lee" <email@hidden>
  • Date: Fri, 27 Jan 2006 22:10:18 -0800

How can I sync the front-end (NSArrayController) with the ManagedObjectContext
so that I don't get flagged with incomplete data errors upon exit?


Scenario:

1) Press 'Add' button to add an empty object instance to an entity.
2) Press 'Remove' button to remove created (empty) object
   {...and restore to original status}
3) Press 'Exit' button to exit panel.

I get an ERROR dialog essentially stating that it can't save incomplete data.

I'm using the following notification to enable/disable some buttons:

- (void)contextDidChange:(NSNotification *)notification {
if ([[[NSApp keyWindow] title] isEqualToString:@"RegionMap Panel"]) {
if (nil != [[notification userInfo] objectForKey:@"inserted"]) {
// New Object Added:
[gvNewRegionMapButton setEnabled:YES];
[gvRegionMapRemoveButton setEnabled:YES];
}
else {
// Current Object Removed:
[gvNewRegionMapButton setEnabled:NO];
[gvRegionMapRemoveButton setEnabled:NO];
[managedObjectContext processPendingChanges]; <-- this doesn't appear to 'sync'.
}
}
return;
}


_______________________________________________
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


  • Prev by Date: Re: CFPreferences
  • Next by Date: Running COCOA application during startup
  • Previous by thread: Re: Java Cocoa application, Java VM not launching
  • Next by thread: Running COCOA application during startup
  • Index(es):
    • Date
    • Thread