I'm trying to create a cascade submenu for a Finder Sync extension in Swift/Cocoa. I have the following code:
override func menuForMenuKind(menuKind: FIMenuKind) -> NSMenu! {
let m = NSMenu(title: "")
let mi1 = NSMenuItem(title: "item1", action: nil, keyEquivalent: "")
let mi11 = NSMenuItem(title: "item11", action: nil, keyEquivalent: "")
let m2 = NSMenu(title: "")
let mi2 = NSMenuItem(title: "item2", action: nil, keyEquivalent: "")
m2.addItem(mi2)
m.addItem(mi1)
m.addItem(mi11)
m.setSubmenu(m2, forItem: mi1)
return m
}
So what I'm trying to achieve is:
item1->
item2
item11
So what I actually get is a flat item1
and item11
menu list.
Any hints?
I filed a bug with Apple (#18810635), got a response that it's a duplicate of (#18531883) which is still open.
Posted the copy of the filing at OpenRadar http://openradar.appspot.com/radar?id=5772557445758976 , tweeted to a developer advocate.
If anyone knows the fate of #18531883 - this is core raison d'être for Finder Sync Extensions?