Problem with dynamically generated menu
Problem with dynamically generated menu
- Subject: Problem with dynamically generated menu
- From: Jesus De Meyer <email@hidden>
- Date: Thu, 18 Apr 2002 19:31:24 +0200
Hello,
In my app I generate a menu dynamically by adding the names of the items
inside a folder. When I launch my app in Project Builder, the menu shows
up fine, but when I double click on it in the Finder, I only get the
"Default" menu item.
Here is the piece of code I'm talking about:
[skinMenu insertItemWithTitle:[NSString stringWithString:@"Default"]
action:@selector(handleSkinMenu:) keyEquivalent:@"" atIndex:0];
for (i = 0; i < [self getSkinFolderItems]; i++) {
NSLog(@"getSkinFolderItem = %@", [self getSkinFolderItem:i]);
[skinMenu insertItemWithTitle:[[self getSkinFolderItem:i]
stringByDeletingPathExtension] action:@selector(handleSkinMenu:)
keyEquivalent:@"" atIndex:i+1];
}
NSLog gives me the correct values, so I'm sure the other methods are ok.
Thanks in advance,
Jesus
______________________________
Jesus De Meyer
CEO @ E dot software
http://homepage.mac.com/edotsoftware
_______________________________________________
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.