Re: NSPersistentDocument bug?
Re: NSPersistentDocument bug?
- Subject: Re: NSPersistentDocument bug?
- From: Ryan Britton <email@hidden>
- Date: Mon, 25 Jul 2005 21:02:20 -0700
I ran into this problem as well. The reason is that an NSTextField
does not commit the changes to its store until either enter is
pressed or it loses first responder status. My solution was to just
call [window makeFirstResponder:someOtherControl] prior to trying to
do anything with the contents of the text field. That forces the
text field to save its value to where the Core Data stuff can deal
with it.
On Jul 25, 2005, at 8:55 PM, Modesitt Software wrote:
I followed the excellent tutorial "Introduction to
NSPersistentDocument Core Data Tutorial" at <http://
developer.apple.com/documentation/Cocoa/Conceptual/
NSPersistentDocumentTutorial/00_Introduction/
chapter_1_section_1.html> and I noticed a bug when saving a
previously saved document to disk. Run the app, open a previously
saved document, enter some text into one of the text fields, select
Quit, the app asks if you want to save the file before quitting.
Click OK, but nothing happens. The application menu remains
highlighted, and the app never quits, it just hangs there. I wrote
an application based on this tutorial, and it exhibits the same
behavior. If you press the Enter key after entering the text, then
all works fine, but try and tell your customers that! Is there
anything that can be done to prevent this bug?
Thanks in advance!
Bill
_______________________________________________
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
_______________________________________________
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