This works...
Create a new project using storyboards and swift.
Using IB add new menu "Thing" with one item "foo" to the main application menu bar.
Add the following to the AppDelegate....
@IBAction func appfoo(sender: AnyObject) { println("yay appfoo!") }
In IB drag from the menu item "foo" to the "First Responder" and select "appfoo"
Run app, select menu item "foo" and "yay appfoo" gets printed out.
This doesnt...
Create a new project using storyboards and swift.
Using IB add new menu "Thing" with one item "foo" to the main application menu bar.
Add the following to the NSViewController....
@IBAction func appfoo(sender: AnyObject) { println("yay viewfoo!") }
In IB drag from the menu item "foo" to the "First Responder" and select "viewfoo"
Run app, select menu item "foo" and "yay viewfoo" does not get printed out.
Which from what I can tell from reading around means that my NSViewController is not in the responder chain. How do I add it? Or is there something else I should do?