Re: Detecting A Changed Cell When Editing Ends
Re: Detecting A Changed Cell When Editing Ends
- Subject: Re: Detecting A Changed Cell When Editing Ends
- From: David Rio Vierra <email@hidden>
- Date: Sun, 22 Dec 2002 11:26:12 -1000
Have you tried storing the previous value of the control text and
comparing/updating it in controlTextDidEndEditing: ? Something like
this:
-(void)controlTextDidEndEditing:(NSNotification *)note
{
NSString * newText = [[note object] stringValue];
if( ! [newText isEqualToString:_oldText] ) // _oldText is an ivar
initialized to @"" {
[_oldText release];
_oldText = [newText retain];
// respond to changed text
}
}
- Rio
On Sunday, December 22, 2002, at 05:30 AM, Jonathan Jackel wrote:
I want to know when a text field cell ends editing AND has been
changed.
controlTextDidChange: fires off a notification with every keystroke.
I only
want to know about the change when editing ends.
controlTextDidEndEditing: notifies me when editing ends, whether the
cell
has changed or not. I want to know whether the cell has changed.
Can someone point me in the right direction?
Jonathan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.