• 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
NSSearchField Categories Menu (bug?!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSSearchField Categories Menu (bug?!)


  • Subject: NSSearchField Categories Menu (bug?!)
  • From: malcom <email@hidden>
  • Date: Wed, 19 Jul 2006 19:30:47 +0200

Hi list,
I would to add a categories menu (ex: search for Subject, Body or ...)
in my NSSearchField. I've successfully set the menu but there is a
problem if I try to set a menuitem to state:NSOffState.
When I select a menu it should be to turn off the previous selected
category. This is the code:

- (IBAction) menu_selectNewFilter:(id) sender {

	NSMenuItem *m = [searchMenu itemWithTag: selectedFilter];
	[m setState: NSOffState];
	NSLog(@"Disabled %@ %d",[m title],[m tag]);

	NSLog(@"Activate %@ %d",[sender title],[sender tag]);
	[sender setState: NSOnState];

	selectedFilter = [sender tag];
}

It works for ONState but the previous item state will never change
(I've also tried to take a look at the debugger and, in fact the state
of NSOffState menuitem is 0...but the checkmark icon still here!).
Is there a problem with this class or is it a problem of mine?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSSearchField Categories Menu (bug?!)
      • From: Adam Knight <email@hidden>
  • Prev by Date: Re: possible to pass direct object param from cocoa to applescript?
  • Next by Date: Re: NSSearchField Categories Menu (bug?!)
  • Previous by thread: Re: PDEPrint Plugin
  • Next by thread: Re: NSSearchField Categories Menu (bug?!)
  • Index(es):
    • Date
    • Thread