nsopenpanel

NSOpenPanel takes longer time on Mac OSX 10.9

风流意气都作罢 提交于 2019-12-02 02:50:11
On Mac OSX 10.9,I am facing an issue with NSOpenPanel in My application. NSopenpanel takes longer time to launch it for the first time. I observed that [NSOpenPanel openPanel] takes longer time to execute for first time.Because of this it took some delay to launch for first time.Can any one suggest how to fix this issue This is probably because of the special architecture of the NSOpenPanel. The open panel runs in it's own process called "Powerbox", especially if the app is sandboxed. The Powerbox does not have an API. Even if your app is not sandboxed, make sure you sign your app

Title bar missing in NSOpenPanel?

我们两清 提交于 2019-12-01 05:55:55
Since OS X 10.11 it seems the title bar no longer appears even when using setTitle: does anyone know what happened and how to get the old behavior back? mangerlahn From the AppKit Release Notes for OS X v10.11 : In 10.11, most NSOpenPanels have adopted a design that was formerly reserved only for applications which adopted iCloud Documents support and this panel design was only used if iCloud Drive was turned on in System Preferences. This note will refer to the design as the “iCloud Open Panel Design” although the design is no longer limited to applications with iCloud Documents support. The

Open File Dialog crashes in Swift

大憨熊 提交于 2019-11-30 16:33:43
I would like to use the open file dialogs from NSFilemanager but my code crashes sometimes and sometimes works and I do not know why. Sometimes it works 100%, sometimes the window is empty, sometimes the background behind the dialog ist shown in the window. When a craash occurs, "signal:SIGABRT" is shown in Xcode. func openfiledlg (title: String, message: String) -> String { var myFiledialog: NSOpenPanel = NSOpenPanel() myFiledialog.prompt = "Öffnen" myFiledialog.worksWhenModal = true myFiledialog.allowsMultipleSelection = false myFiledialog.canChooseDirectories = false myFiledialog

Open File Dialog crashes in Swift

谁都会走 提交于 2019-11-30 16:19:00
问题 I would like to use the open file dialogs from NSFilemanager but my code crashes sometimes and sometimes works and I do not know why. Sometimes it works 100%, sometimes the window is empty, sometimes the background behind the dialog ist shown in the window. When a craash occurs, "signal:SIGABRT" is shown in Xcode. func openfiledlg (title: String, message: String) -> String { var myFiledialog: NSOpenPanel = NSOpenPanel() myFiledialog.prompt = "Öffnen" myFiledialog.worksWhenModal = true

Trouble creating Security-Scoped Bookmark

冷暖自知 提交于 2019-11-30 11:56:33
I'm converting my Lion app to use the App Sandbox. I'm trying to make use of the security-scoped bookmarks feature introduced in 10.7.3 to allow persistent access to a folder. The code I have below returns a nil bookmark, and produces the following log message: XPC couldn't look up the Mach service for scoped bookmarks agent . I set the User Selected File Access entitlement to Read/Write Access , and also tried with and without the surrounding ..AccessingSecurityScopedResource calls. I think I'm doing everything right according to the documentation, so I'd appreciate any pointers. The code was

Trouble creating Security-Scoped Bookmark

假装没事ソ 提交于 2019-11-29 17:34:12
问题 I'm converting my Lion app to use the App Sandbox. I'm trying to make use of the security-scoped bookmarks feature introduced in 10.7.3 to allow persistent access to a folder. The code I have below returns a nil bookmark, and produces the following log message: XPC couldn't look up the Mach service for scoped bookmarks agent . I set the User Selected File Access entitlement to Read/Write Access , and also tried with and without the surrounding ..AccessingSecurityScopedResource calls. I think

Why is NSOpenPanel/NSSavePanel showing memory leak?

僤鯓⒐⒋嵵緔 提交于 2019-11-29 12:13:35
Not sure why, but making a simple [[NSOpenPanel openPanel] runModal]; creates a memory leak - seen in Leaks Instrument. Seems off. It's an auto-released object, shouldn't it be automatically released after ARpool is drained? Is there a way to fix this? NSOpenPanel is a singleton, which means you always get the same instance of the object every time you use it. This means that the first time you call [NSOpenPanel openPanel] , an instance of NSOpenPanel is created and not released. This is not a leak, it's an optimisation. However, sometimes the Leaks instrument picks up such once-only

Why is NSOpenPanel/NSSavePanel showing memory leak?

╄→гoц情女王★ 提交于 2019-11-28 05:42:42
问题 Not sure why, but making a simple [[NSOpenPanel openPanel] runModal]; creates a memory leak - seen in Leaks Instrument. Seems off. It's an auto-released object, shouldn't it be automatically released after ARpool is drained? Is there a way to fix this? 回答1: NSOpenPanel is a singleton, which means you always get the same instance of the object every time you use it. This means that the first time you call [NSOpenPanel openPanel] , an instance of NSOpenPanel is created and not released. This is