Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6106953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:08:06+00:00 2026-05-23T14:08:06+00:00

In my application, I want the user to be able to select a file/location

  • 0

In my application, I want the user to be able to select a file/location to save data to. Thus, I’m using the following code:

NSSavePanel *newSavePanel = [NSSavePanel savePanel];
NSArray *newArray = [[NSArray alloc] initWithObjects:@"txt", nil]; //example file type
[newSavePanel setAllowedFileTypes:newArray];

NSInteger newInt;

newInt = [newSavePanel runModal];

My problem is that I want the save panel to alert the user and ask for confirmation to overwite if the file already exists. To do this, do I need to implement the delegate method panel:userEnteredFilename:confirmed: in which I place a [[NSFileManager defaultManager] fileExistsAtPath:] message, at which point I create an NSAlert, or is there a better way to go about doing this?

I haven’t actually had time to test this, so if the behavior is already implemented in NSSavePanel, could someone let me know?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:08:07+00:00Added an answer on May 23, 2026 at 2:08 pm

    I may be wrong, but I think you get that behavior by default.
    *edit – * yeah you get that out of the box, I used your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application I want the user to be able to select some content
I want the user to be able to see my application in the menu
in our AIR application, I want to user to be able to download a
In my application, i want user to select a font, from a list of
I am downloading PDF file in my application and want to allow user to
I have a WTL C++ application and I want the user to be able
I'm developing an application for debugging purposes. I want the user to be able
In my application I want the user to load an image as the canvas
In my ASP.NET MVC application I want a user to add a value into
I have an android application and web-server working together. Now I want user log

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.