mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-22 19:31:27 +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:
parent
d72dd8c4ff
commit
bcd0479074
@ -222,12 +222,16 @@ class MachineDocument:
|
|||||||
}
|
}
|
||||||
|
|
||||||
@IBAction final func insertMedia(_ sender: AnyObject!) {
|
@IBAction final func insertMedia(_ sender: AnyObject!) {
|
||||||
let panel = NSOpenPanel()
|
let openPanel = NSOpenPanel()
|
||||||
self.openGLView.window!.beginSheet(panel) { (response) in
|
openPanel.beginSheetModal(for: self.windowControllers[0].window!) { (response) in
|
||||||
if response == .OK {
|
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)")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user