This is the minimum app code that recreates the problem. I have REMOVED the framework completely and just included the stripped down APP class.
the project consists basically of two files
#1 main.swift (this does NOT use appdelegate file)
import Cocoa
let theApp = NSApplication.shared
theApp.delegate = app // see App.swift
theApp.run()
#2 the test “app” itself
import Cocoa
import Foundation
let app = App()
class App : dsAPPLICATION {
override func open() {
let xx = NSSavePanel()
let _ = xx.runModal()
}
}
open class dsAPPLICATION: NSObject, NSApplicationDelegate {
public override init() {
super.init()
UserDefaults.standard.set(true, forKey: "NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints")
}
open func open() { print("default: App Open")}
public func applicationDidFinishLaunching(_ aNotification: Notification) { open() }
}
- create an Xcode project with these two files
- run
- a save dialog will appear
- if it is expanded, the collapse it (this works)
- attempt to expand it again… the program terminates