Right now I'm porting a little app to Swift 2.0. As it came up I have to subclass NSPanel and handle the flagsChanged: event. Now something curious:
import Cocoa
class SearchPanel: NSPanel {
override func flagsChanged(theEvent: NSEvent) {
super.flagsChanged(theEvent)
print("hello!")
}
}
Instead of "hello!" being printed to the console the OS X printing dialog opens and wants to print the panel's contents. I guess it's because NSWindow's print(sender: AnyObject?) method is called instead of the global print<T>(val: T).
So how can I call the right print()?