@implementation AppController : CPObject
var myApp = [CPApplication sharedApplication]
, myMenu = [myApp mainMenu]
, menuItem = [[CPMenuItem alloc] initWithTitle:@"Item" action:nil keyEquivalent:nil];
At least in terms of it showing up on the right, that is expected behavior. At some point we may change the APi for left/right menus.
Why is this expected? Cocoa does not throw them on the right side does it?
Label: #new. What's next? A reviewer should examine this issue.
Labels: #needs-confirmation, #new, AppKit, bug. What's next? This issue needs a volunteer to independently reproduce the issue.
The issue is not that it throws the menu item to the right of the other items, but that it places it on the right side of the menu bar.
This is still a problem with the latest master.
Note that this only seems to work with non-NibApplication apps. That is, adding the above code to a NibApplication will correctly place it to the right of the menu items.
The Cocoa documentation says:
Adds a menu item to the end of the receiver."
Which I would take to mean that it adds it to the end of the list of menu items, not to the right-hand side of the menu.
I've created a reduction for this: https://dl.dropbox.com/u/1996023/capp/Issue2222-2.zip
Labels: #accepted, #needs-patch, AppKit, bug. What's next? This issue needs a volunteer to write and submit code to address it.
Milestone: Someday. Labels: #accepted, #needs-patch, AppKit, bug. What's next? This issue needs a volunteer to write and submit code to address it.