Re: NSTextField not saving value to CoreData on Sheet Close
Re: NSTextField not saving value to CoreData on Sheet Close
- Subject: Re: NSTextField not saving value to CoreData on Sheet Close
- From: "I. Savant" <email@hidden>
- Date: Thu, 18 Jan 2007 11:39:28 -0500
Jon:
Have a look at NSWindow's -endEditingFor: method.
--
I.S.
On Jan 18, 2007, at 11:34 AM, Jon Trainer wrote:
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:
40gmail.com
This email sent to email@hidden
_______________________________________________
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