Dock menu weirdness
Dock menu weirdness
- Subject: Dock menu weirdness
- From: email@hidden (Sebastian Krauß)
- Date: Thu, 14 Feb 2002 17:39:51 +0100
Hi everybody,
I wrote a small app that has a dynamic Dock menu. At first, I thought, I
did something wrong because sometimes some items were selectable when I
did not set an action.
But then I tried this:
-(id)init
{
[super init];
if (self == nil) return nil;
numberOfItemsInDockMenu = 0;
[NSApp setDelegate:self];
return self;
}
- (NSMenu *)applicationDockMenu:(NSApplication *)sender
{
int i;
NSMenuItem *tmpItem;
NSMenu *tmpMenu = [[[NSMenu allocWithZone:[NSMenu zone]] initWithTitle:
@"Menu"] autorelease];
numberOfItemsInDockMenu++;
for (i = 0; i < numberOfItemsInDockMenu; i++)
{
tmpItem = [[[NSMenuItem alloc] initWithTitle:[NSString
stringWithFormat:@"Item %d", i] action:nil keyEquivalent:@""] autorelease]
;
[tmpMenu addItem:tmpItem];
}
return tmpMenu;
}
When there are less than 62 or more than 93 items in the Dock menu,
everything is fine. But from 62 to 93 items, there is a group of
selectable items in the menu that gets less the higher the number. And
there are definetely no actions for these menu items.
Even setEnabled:NO doesn't do the trick.
Am I doing something wrong or is that just plain a bug?
Sebastian
---
"Most people put some sort of quote at the end of their signature.
I don't."
-- Liam Downing
_______________________________________________
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.