• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
re-using combobox in a sheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: Cocoa Bindings - many people using them?
  • Next by Date: Re: Avoiding == and = mixup in if statements
  • Previous by thread: Re: 'Search field' class yet?
  • Next by thread: NSTask problems with the path
  • Index(es):
    • Date
    • Thread