|
From: | Andreas Höschler |
Subject: | Re: NSComboBox delegate |
Date: | Sun, 5 Feb 2006 16:14:03 +0100 |
For these ones, it is the expected behavior I think.
textDidChange: or textDidEndEditing: are delegate methods specific to NSText/NSTextView, but not part of NSControl.
NSTextField is in fact NSComboBox superclass and NSControl is NSTextField superclass.
At first sight, it may seem that NSTextField sends such textDidChange: method to its delegate because it implements this method. In fact NSTextField is the field editor delegate, that's why it implements these NSTextView delegate methods.
Here are NSTextView notifications :
- textShouldBeginEditing:
- textDidBeginEditing:
- textDidChange:
- textShouldEndEditing:
- textDidEndEditing:
They are received by NSTextField/NSComboBox, but propagated to their own delegate in form of NSControl notifications.
So you have to rely on NSControl notifications which are :
- control:textShouldBeginEditing:
- control:textShouldEndEditing:
- controlTextDidBeginEditing:
- controlTextDidChange:
- controlTextDidEndEditing:
I hope I haven't made wrong statements :-)
Let me know whether it works better this way or not.
[Prev in Thread] | Current Thread | [Next in Thread] |