Can someone explain me why textDidChange isn't handling my delegate but controlTextDidChange works from NSTextField.
- (void)controlTextDidChange:(NSNotification *)aNotification{
NSBeep();
}
from
- (void)textDidChange:(NSNotification *)aNotification{
NSBeep();
}
controlTextDidChange:
is the correct delegate method defined on NSTextField
(inherited from NSControl
).
textDidChange:
is a method that, when called on NSTextField
, makes it behave as if its text changed (including calling the above method). It is not a delegate method for you to implement.
It's a little inconsistent of Apple as they do have a textDidChange:
delegate method on UISearchBarDelegate.
textDidChange: Informs the delegate that the text object has changed its characters or formatting attributes.
I'm guessing that means its font (text attributes) changes, and not the text inputted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With