re-using combobox in a sheet
re-using combobox in a sheet
- Subject: re-using combobox in a sheet
- From: Chuck Soper <email@hidden>
- Date: Fri, 21 May 2004 13:42:30 -0700
Hello,
I have an NSComboBox with a dataSource on a sheet. It works great,
but there's problem when I attempt to use it a second time. The
second time I use the combobox on the sheet,
comboBox:completedString: is not called when I type the first
character and the text is not completed when it should be. When I
type the second character comboBox:completedString: is called and the
text is completed.
My action to dismiss the sheet is below. I'm not sure if I'm posting
the notification correctly or even if I need to. Does anyone know how
I can get this working?
Thanks,
Chuck
- (IBAction)hitOKOnSheet:(id)sender;
{
[[myComboBox dataSource] comboBox:myComboBox completedString:@""];
[[NSNotificationCenter defaultCenter]
postNotificationName:@"textDidEndEditing" object:myComboBox];
[myComboBox setStringValue:@""];
[myComboBox scrollItemAtIndexToTop:0];
[NSApp stopModal];
[mySheet orderOut: self];
}
_______________________________________________
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.