NSTextField not saving value to CoreData on Sheet Close
NSTextField not saving value to CoreData on Sheet Close
- Subject: NSTextField not saving value to CoreData on Sheet Close
- From: Jon Trainer <email@hidden>
- Date: Thu, 18 Jan 2007 11:34:31 -0500
I have a modal sheet with some NSTextFields for adding a new record
to an NSArrayController using CoreData. If the user fills in the
fields and clicks the "Close" button without leaving the last field
and leaving it still focused in edit mode, the value does not get
saved to the CoreData model. If the user explicitly leaves the field
the value gets saved as expected.
The Close Button action is set to a method that sends orderOut: to
the sheet:
- (IBAction)finishSheet:(id)sender
{
[mySheet orderOut:sender];
[NSApp endSheet:mySheet];
}
I would have expected the NSButton to get focus and cause the
NSTextField to end editing mode. How do I force the field's value to
get saved to CoreData upon the -orderOut: of the sheet?
Thanks,
Jon
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden