Im using swift and I show NSOpenPanel. As a delegate, I need to look at the sender’s hint to determine what action to take:
eg.
func show() {
...
panel.delegate = self
panel.prompt = "xy"
panel.run ....
}
func show2() {
...
panel.delegate = self
panel.prompt = "abc"
panel.run ....
}
func panel(sender: AnyObject, shouldEnableURL url: NSURL) -> Bool {
let panelPrompt = (sender as! NSOpenPanel).prompt ...
}
, , , ?
/ idk
performSelector?
===
: NSOpenPanel !