• 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
NSTextField not saving value to CoreData on Sheet Close
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTextField not saving value to CoreData on Sheet Close
      • From: "I. Savant" <email@hidden>
References: 
 >RE: Weird Sheet Problem (From: Matt <email@hidden>)

  • Prev by Date: Re: NSTableView vertical focus change...
  • Next by Date: Re: Removing an object from an ArrayController...
  • Previous by thread: RE: Weird Sheet Problem
  • Next by thread: Re: NSTextField not saving value to CoreData on Sheet Close
  • Index(es):
    • Date
    • Thread