Re: Core Data / Bindings Behavior
Re: Core Data / Bindings Behavior
- Subject: Re: Core Data / Bindings Behavior
- From: Jeff LaMarche <email@hidden>
- Date: Wed, 8 Jun 2005 00:48:02 -0400
Been playing with this some more. Found a way to get it to preserve the edit, but it's a hack and it causes a selector not found message at runtime... but at least it works. Here's what I did:
// ----------------------------------------------------------------------------------------------- - (IBAction) saveAction:(id)sender // ----------------------------------------------------------------------------------------------- { id r = [[window firstResponder] delegate]; if ([r isKindOfClass:[NSTextField class]]) [r textDidChange:[NSNotification notificationWithName:@"Saving" object:self]]; NSError *error = nil; if (![[self managedObjectContext] save:&error]) [[NSApplication sharedApplication] presentError:error];
}
If anyone knows a "right" way to handle this situation, please let me know. I feel dirty doing this. =)
Jeff |
_______________________________________________
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