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:
parent
d72dd8c4ff
commit
bcd0479074
@ -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)")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user