nsopenpanel Questions
1
I'm trying to show the file picker window from my macOS GUI app written with SwiftUI. So I call this:
let panel = NSOpenPanel()
//panel.allowedFileTypes = ["myext"] //I get a warning her...
Averi asked 9/4, 2023 at 16:53
2
Solved
I'm trying to get the user to select a file from a folder containing log files. So I want to display an NSOpenDialog showing the contents of that folder. I'm using Swift, so 10.9+
I see a number o...
Sidoon asked 5/4, 2016 at 21:0
2
Solved
I'm using NSOpenPanel to allow a user to select a folder to save documents into. I would like to restrict what folder (in terms of hierarchy) they can save into. Essentially, I want to prevent them...
Scholiast asked 15/4, 2011 at 21:45
6
Solved
I have this Objective-C Code :
- (IBAction)selectFileButtonAction:(id)sender {
//create open panel...
NSOpenPanel* openPanel = [NSOpenPanel openPanel];
// NSLog(@"Open Panel");
//set restric...
Negrito asked 28/10, 2014 at 13:35
2
Solved
Ive looked around at other answers, but nothing seems to be helping my case.
I have a viewController class which contains an IBAction for a button. This button should open a NSOpenPanel as a sheet...
Cf asked 13/4, 2015 at 0:45
3
Solved
I've been trying to get a window to show up asking the person to choose a file, and I eventually did. The problem is, Xcode complains that the method I'm using is deprecated. I looked in the class ...
Halophyte asked 7/10, 2011 at 23:56
1
My Mac app is designed to edit and analyse graphs, which users can create and store in files anywhere on the file system. I go to user to let them open a previously created file with [NSOpenPanel o...
Tb asked 25/2, 2017 at 17:39
1
I am trying to record a test case in which an NSDocument create and saves a file (then opens + verifies the contents again). The problem is when I record my test case, once a NSSavePanel is launche...
Permutation asked 4/4, 2017 at 14:56
0
Recently upgrade to macOS Sierra version 10.12, Xcode version 8.2.1
The following code works on OS Sierra but with a warning message. It works on the previous OS El Capitan 10.11 without warning m...
Potaufeu asked 22/3, 2017 at 20:11
1
I have an application running in the sandbox which launches a helper application bundle using NSTask (the helper is contained within the bundle of the app).
Using the correct entitlements the main...
Mettle asked 9/12, 2015 at 3:53
2
Solved
In Swift 3/Xcode8.1/10.12.2 I am trying to use a NSOpenPanel to get a text file with the following code, written by DenBeke
@IBAction func browseFile(sender: AnyObject) {
let dialog = NSOpenPane...
Larainelarboard asked 27/12, 2016 at 17:48
4
is there any way that I can pass a URL to a folder on my system which should be the default window which an NSOpenPanel opens?
Thanks!
Update:
NSOpenPanel *ads_open = [[NSOpenPanel openPanel] re...
Truett asked 13/7, 2012 at 10:19
1
Solved
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?
Guesswarp asked 27/4, 2016 at 2:27
7
Solved
I have an NSImageView which I get an image for from an NSOpenPanel. That works great.
Now, how can I take that NSImage, half its size and save it as the same format in the same directory as the or...
Roller asked 10/3, 2011 at 19:43
1
I am building sandboxed OS X app (OS X 10.10.5, Xcode 6.4).
In the course of execution I open NSOpenPanel object.
Then I run next snippet:
NSString* s=[@"~" stringByExpandingTildeInPath];
NSOpenP...
Souther asked 3/9, 2015 at 15:56
2
Solved
In my Application i need to show the select file dialog,
I am making use of the NSOpenPanel which allows to select the file, code is as shown below,
- (IBAction)sendFileButtonAction:(id)sender{
...
Stibine asked 11/4, 2011 at 12:48
1
Solved
Does anyone know how to preselect a file in the NSOpenPanel dialog?
This has been asked several times before, but none of those questions were answered with a working solution. Setting nameFieldS...
Misdirection asked 19/9, 2013 at 20:2
0
Background
Calling -beginWithCompletionHandler: on NSOpenPanel causes the user interface to hand of about a second after the use hits the open button.
Two messages error messages are printed,
...
Venetic asked 6/2, 2013 at 4:0
1
Solved
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...
Tsarevitch asked 6/4, 2012 at 12:15
1
Solved
This is how I display an open panel as a floating window.
Can someone help me out with running the panel as a sheet ? The window object is mWindow. Much of the standard code I was using is deprec...
Nell asked 9/2, 2012 at 21:0
2
Solved
I have a NSOpenPanel. But I want to make it PDF-files selectable only. I'm looking for something like that:
// NOT WORKING
NSOpenPanel *panel;
panel = [NSOpenPanel openPanel];
[panel setFloating...
Honor asked 27/11, 2010 at 22:6
1
© 2022 - 2024 — McMap. All rights reserved.