controlTextDidEndEditing vs controlTextDidChange
controlTextDidEndEditing vs controlTextDidChange
- Subject: controlTextDidEndEditing vs controlTextDidChange
- From: email@hidden
- Date: Mon, 3 Jun 2002 01:40:33 EDT
When using TextFields, and wanting to sync the content of the field with
internal data (usually a NSString contained in a document), which is the best
notification to watch, controlTextDidEndEditing vs controlTextDidChange?
For example, if I attach a delegate to a field, and watch the Text Did change
notification, I get called everytime any part of string changes. This sounds
fine, but what if I want to post an Undo event for every text change. I do
not want 10 events to undo when someone types in a 10 char string. I want
just one event, when string is completed. So I can watch
controlTextDidEndEditing. But that is only called when focus changes to
another field. It is not called for important actions like saving document,
or selecting menu item, ie. actions that really do indicate the user is done
typing some text.
Any ideas or comments?
Oh, this entire question also applies to Combobox's and the
comboBoxSelectionDidChange vs comboBoxSelectionIsChanging methods.
Steve
_______________________________________________
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.