Skip navigation.
 
mlNSComboBox Delegates
FROM : Charles Ross
DATE : Tue Jun 20 18:18:59 2006

I have an NSComboBox with the delegate set to my NSPersistentDocument 
subclass. I've successfully implemented a comboBoxSelectionDidChange 
method in the document class, but I also want to catch when the user 
changes the text without selecting something. I noticed that 
NSComboBox is a subclass of NSTextField and that this class has a 
delegate method for textDidChange, which, I would think, would cover 
the event where the user simply deletes the text in the NSComboBox or 
enters something not available in the menu. However, when I implement 
textDidChange in my document class it's never called (as demonstrated 
with its implementation having a single NSLog() function).

So, my question is, why? Do delegate methods of superclasses not get 
called? comboBoxSelecitonDidChange does get called, so the delegate 
is properly set. Am I simply going about this in the wrong way? Is 
there a better way to capture the user altering the entry in an 
NSComboBox by typing rather than using the menu?

Thanks,
Chuck Ross
Developer & Writer
mailto:<email_removed>
AIM:mer0dyn
web:http://www.chivalrysoftware.com/

Related mailsAuthorDate
mlNSComboBox Delegates Charles Ross Jun 20, 18:18
mlRe: NSComboBox Delegates Michael Ash Jun 20, 20:36