yesthisisjoe
yesthisisjoe

Reputation: 2035

NSSavePanel appears differently between applications, even with identical code

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.

Test Project

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:

enter image description here

The Real Project

When I use the same code (except the image file name) in my existing application, I get an NSSavePanel that appears like this:

enter image description here

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

Answers (0)

Related Questions