- /*NSMenu *ratingSubmenu = [[NSMenu alloc] initWithTitle:@""];
- unichar whiteStarChar = 2606;
- unichar blackStarChar = 2605;
- NSString *whiteStar = [NSString stringWithCharacters:&whiteStarChar
- length:1];
- NSString *blackStar = [NSString stringWithCharacters:&blackStarChar
- length:1];
- NSData *whiteStarData = [whiteStar dataUsingEncoding:NSUTF8StringEncoding];
- NSData *blackStarData = [blackStar dataUsingEncoding:NSUTF8StringEncoding];
- NSString *string = @"";
- int i;
-
- whiteStar = [[NSString alloc] initWithData:whiteStarData encoding:NSUTF8StringEncoding];
-
- for (i = 0; i < 5; i++) {
- string = [string stringByAppendingString:whiteStar];
- }
- for (i = 0; i < 6; i++) {
- NSMenuItem *ratingItem;
- ratingItem = [ratingSubmenu addItemWithTitle:string action:@selector(setSongRating:) keyEquivalent:@""];
- [ratingItem setTarget:self];
- [ratingItem setTag:i * 20];
- string = [string substringToIndex:4];
- string = [blackStar stringByAppendingString:string];
- }
- [ratingSubmenu autorelease];*/
- [[menu addItemWithTitle:@"Song Rating"