1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

This in principle completes the insert action.

With the caveat that 'New...' machines seem to have blocked the window's panel queue somehow.
This commit is contained in:
Thomas Harte 2018-08-05 13:12:02 -04:00
parent d72dd8c4ff
commit bcd0479074

View File

@ -222,12 +222,16 @@ class MachineDocument:
}
@IBAction final func insertMedia(_ sender: AnyObject!) {
let panel = NSOpenPanel()
self.openGLView.window!.beginSheet(panel) { (response) in
let openPanel = NSOpenPanel()
openPanel.beginSheetModal(for: self.windowControllers[0].window!) { (response) in
if response == .OK {
Swift.print("An animal")
for url in openPanel.urls {
let mediaSet = CSMediaSet(fileAt: url)
if let mediaSet = mediaSet {
mediaSet.apply(to: self.machine)
}
}
}
Swift.print("\(response)")
}
}