• 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
Re: Detecting A Changed Cell When Editing Ends
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Detecting A Changed Cell When Editing Ends
      • From: Jonathan Jackel <email@hidden>
References: 
 >Detecting A Changed Cell When Editing Ends (From: Jonathan Jackel <email@hidden>)

  • Prev by Date: Help with framework and palette installation
  • Next by Date: Animated dock icon
  • Previous by thread: Re: Detecting A Changed Cell When Editing Ends
  • Next by thread: Re: Detecting A Changed Cell When Editing Ends
  • Index(es):
    • Date
    • Thread