• 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
setting menuitem state...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setting menuitem state...


  • Subject: setting menuitem state...
  • From: email@hidden
  • Date: Mon, 26 Jan 2004 11:57:06 -0800

ok so this is supposed to let the user turn on or off multiple items in
the popupbutton menu but even if status is NO it doesn't set the menu
item to NSOffState...i can't figure out why i've check it and the item
is a bool set to no but it doesn't work it will set the NSOnState once
then they just stay on?

- (void)menuWillPopUp:(NSNotification *)aNotification;
{


NSMenuItem *item;
NSEnumerator *enumerator = [[nameMenu itemArray] objectEnumerator];

while(item = [enumerator nextObject])
{
if (![item isSeparatorItem])
{
NSMutableDictionary *tempDict = [NSMutableDictionary dictionary];
[tempDict addEntriesFromDictionary:[ABFieldsDict valueForKey:[item
title]]];

if ([tempDict valueForKey:@"status"])
{
[[nameMenu itemWithTitle:[item title]] setState:NSOnState];
}
else
{
[[nameMenu itemWithTitle:[item title]] setState:NSOffState];
}
}
}

}
_______________________________________________
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.

  • Follow-Ups:
    • Re: setting menuitem state...
      • From: "Louis C. Sacha" <email@hidden>
    • Re: setting menuitem state...
      • From: Jonathan Jackel <email@hidden>
  • Prev by Date: New document repositions to cascade
  • Next by Date: Re: Collapsing/expanding NSSplitView
  • Previous by thread: RE: New document repositions to cascade
  • Next by thread: Re: setting menuitem state...
  • Index(es):
    • Date
    • Thread