Re: More NSSearchField menu questions
Re: More NSSearchField menu questions
- Subject: Re: More NSSearchField menu questions
- From: Andrew Platzer <email@hidden>
- Date: Wed, 7 Jan 2004 10:37:22 -0800
On Jan 1, 2004, at 3:23 PM, Aaron Patterson wrote:
I've made my search menu work, /mostly/. It displays the menu, and I
can select
an item, and have a check mark displayed next to it.
The problem I'm having is that if I check an item in the list, then
type
something in the search field, and hit the "return" key, my menu goes
back to
the way the menu was set up when the "setSearchMenuTemplate" call was
made.
When I run the sample code I've included, I can check the "Hello
World" field,
then type stuff in the search field, and hit the return key. Once
I've hit
return, if I examine the menu, "Hello World" is no longer checked. I
would
greatly appreciate any insight someone might have. Thanks!
The menu is being reconstructed from the template menu so the call to
-setState: is lost the next time the menu changes (in this case to add
the new recents item.)
Instead change the menu item state in your template menu and call
-setSearchMenuTemplate: again.
Andrew
_______________________________
Andrew Platzer
Application Frameworks
Apple Computer, Inc.
_______________________________________________
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.