Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
103 views

I have code in my macOS app that shows a save dialog using NSSavePanel. I want the panel to always open in a specific directory that I send as a parameter to my function. (e.g., /User/Desktop). Here’s ...
Ishi's user avatar
  • 3
0 votes
1 answer
56 views

Due to a bug on macOS Sonoma I am looking for a workaround to trigger default action of NSSavePanel in a sandboxed app. The issue is that the NSSavePanel's accessorryView view doesn't react to enter ...
Marek H's user avatar
  • 5,652
0 votes
0 answers
47 views

I'm using the following to let a user pick a file to save in my macOS app: let panel = NSSavePanel() let resp = panel.runModal() if(resp == .OK) { let strFilePath = panel.url?.path(); } The ...
c00000fd's user avatar
  • 22.8k
2 votes
0 answers
37 views

This problem did not happen before macOS Ventura(Xcode 14.2), but I think the process of handling the security policy to Sandbox file access has changed significantly since this current version. I ...
hibara's user avatar
  • 147
0 votes
0 answers
97 views

I have a function that uses an NSSavePanel to get a URL to save a text file report. I'm trying to check to see if the resulting url ends in ".txt" and if it does, great. If it doesn't I am ...
psb's user avatar
  • 151
0 votes
1 answer
573 views

I'm playing with the NSDocument class to make a simple document-based application. My info.plist contains four document content type identifiers including public.text, public.plain-text, public....
El Tomato's user avatar
  • 6,705
1 vote
0 answers
153 views

In an application like TextEdit, if the user attempts to close a new document, a special NSSavePanel is displayed. Is there any way that I can create an NSSavePanel that resembles this dialog? The ...
Alan Snyder's user avatar
0 votes
0 answers
414 views

I'm working on a flutter package for all 6 Platforms and now I'd like to open a Save As dialog (I'm total amateur in Swift), so I'm getting an exception when Initializing the object of NSSavePanel, I ...
Hassan Ansari's user avatar
0 votes
1 answer
1k views

Running in macOS 10.15.6, built with Xcode 11.1, my app is suddenly (at least I just noticed) spitting out these warnings on the console when I present a save dialog: WARNING: <NSSavePanel: ...
James Bucanek's user avatar
0 votes
0 answers
161 views

I always run macOS with the Finder options set to show extensions. I have some code that opens an NSSavePanel. In macOS versions before Catalina, it opened with only the filename selected and not the ...
rpatters1's user avatar
  • 466
0 votes
0 answers
69 views

I have a Java application on macOS that uses SWT. Sometimes this application needs to ask for a filename. Now, while SWT has a file dialog, this is sort of broken in recent versions. So I made my own ...
user2543253's user avatar
  • 2,173
2 votes
2 answers
864 views

Only in MacOS 10.15, only when trying to save a file twice to the same directory, and only after opening a NSOpenPanel then tap Cancel or Open. My app hangs up with the following stacktrace and the ...
John's user avatar
  • 31
1 vote
1 answer
536 views

User has to save a file, but I only want them saving the file in one folder. How to do this? I have already tried implementing the delegate and forcefully setting back the directory if it is ...
swift nub's user avatar
  • 2,957
0 votes
0 answers
349 views

I use non English (Czech) UI of macOS Mojave and XCode 10.0 where I want to use NSOpenPanel and NSSavelPanel in my Swift 4.2 application. Some text items used in panels I can localize via NSOpenPanel/...
Dawy's user avatar
  • 948
0 votes
0 answers
118 views

For a given NSOpenPanel or NSSavePanel you can set a directory to show with: [panel setDirectoryURL:[NSURL fileURLWithPath:@"/SomeFolder"]]; There you can set whatever path you like, but how can you ...
aone's user avatar
  • 67
2 votes
0 answers
469 views

I often create my own document type for my desktop applications. But I have never registered my own custom UTI. Anyway, I want to save a simple Dictionary data as a data (NSData) file like the ...
El Tomato's user avatar
  • 6,705
4 votes
1 answer
5k views

I'm using this code to give the user the choice to specify a name and a location where to save a plain text file on disk. All seems to work but the saved file hasn't any extension. Actually I have not ...
Cue's user avatar
  • 3,122
0 votes
1 answer
427 views

I am creating a save panel with an accessoryView that contains a single checkbox. I can get it to work when I create the button using: NSButton(checkboxWithTitle: "Check Me", target: self, action: #...
MH175's user avatar
  • 2,354
1 vote
1 answer
74 views

When I create a NSSavePanel to be modeless, the dragging behavior is very strange: It does not react to dragging attempts in the title bar When I initiate the drag in other areas of the panel, it will ...
melody5417's user avatar
4 votes
1 answer
3k views

I’m creating a macOS app which ships with some .zip files within its Bundle directory. Users should be able to save these files from my app to a custom directory. I found NSSavePanel and thought ...
ixany's user avatar
  • 6,200
0 votes
1 answer
653 views

I'm saving some objects to a file using Key Value Coding. I'd like the extension of the saved file to be hidden (or at least be hidden unless the value in Finder → Preferences → Advanced "Show All ...
glenstorey's user avatar
  • 5,152
2 votes
0 answers
347 views

I use an NSSavePanel to ask users to indicate the file to which they want to save some information. If they choose an existing file I'd simply append the new information to the end. The issue is that ...
saiwing's user avatar
  • 919
0 votes
1 answer
481 views

When it needs folder permission in Sandbox, The Unarchiver will show a window like below. I can ask permission myself using NSSavePanel, but there is an extra file name text field. If I try ...
Owen Zhao's user avatar
  • 3,395
2 votes
0 answers
382 views

I am using NSSavePanel and adding an Accessory View onto it using IKSaveOptions. Pre-Yosemite it worked great and then Yosemite caused a crash as per: NSSavePanel crashes on Yosemite I implemented ...
viperfoth's user avatar
0 votes
0 answers
474 views

I am using XCode7 beta2 to play around with Swift 2. Trying to use a File-Selection Dialog (NSSavePanel) brought me into some trouble. Running the following code by clicking the associated button ...
techshack's user avatar
  • 459