Re: Saving NSTextView data to CoreData without ending editing
Re: Saving NSTextView data to CoreData without ending editing
- Subject: Re: Saving NSTextView data to CoreData without ending editing
- From: Mike Manzano <email@hidden>
- Date: Fri, 25 Apr 2008 17:06:16 -0700
Here's what I'm doing:
- (void)endEditingSavingCurrentResponder
{
NSResponder *currentResponder = [self firstResponder];
if ([currentResponder isKindOfClass:[NSTextView class]])
{
if( [(NSTextView *) currentResponder isFieldEditor] )
currentResponder = [(NSTextView *)currentResponder delegate];
}
if (![self makeFirstResponder:self])
[self endEditingFor:nil];
[self makeFirstResponder:currentResponder];
}
On Apr 25, 2008, at 5:03 PM, William Turner wrote:
When you say you are "ending editing" what do you mean? Are you
using commitEditing?
Wil
On Apr 22, 2008, at 12:26 PM, Mike Manzano wrote:
I have an application that periodically needs to save content
contained in an NSTextView. The text view is bound to a Core Data
managed object. Currently, I am ending editing on the text view to
force it to save its contents into the store. However, since I'm
doing it automatically on a time interval, the view goes out of
focus which is annoying if you're typing into it. Is there a way to
save the text view's contents without ending editing on it?
Thanks,
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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