Reputation: 2035
I was having trouble with an NSSavePanel in my project, so to try to isolate the problem, I created a test project that included only the NSSavePanel code in the default window's viewDidLoad.
The code I used to show the NSSavePanel:
dispatch_async(dispatch_get_main_queue()) {
let savePanel = NSSavePanel()
savePanel.nameFieldStringValue = "test.png"
let result = savePanel.runModal()
if result == NSFileHandlingPanelOKButton {
print("You hit that OK button.")
}
}
The save panel that appears looks like this:
When I use the same code (except the image file name) in my existing application, I get an NSSavePanel that appears like this:
Key differences:
What in the world is happening here? Clearly the problem is bigger than just that snippet of code. Does anyone have any idea what it is?
Upvotes: 1
Views: 130