setting menuitem state...
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.