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 8870375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:42:43+00:00 2026-06-14T17:42:43+00:00

I have an nsdocument subclass which handles the loading of a binary file (of

  • 0

I have an nsdocument subclass which handles the loading of a binary file (of an existing format, not of my creation.) The file format uses 3 files with the same name for each logical “document” (with different extensions).

I want to be able to have the user select the 3 files in the NSOpenPanel, and then have one NSDocument subclass with its corresponding window created. I know how to set a panel to allow selection of multiple files, but I don’t know how to get to the panel that NSDocumentController is using, or what methods to override for loading binary data out of the multiple files.

  • 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-06-14T17:42:44+00:00Added an answer on June 14, 2026 at 5:42 pm

    Relying on the user to do things some singular correct way to work around your app’s own limitations is bound to fail. Whatever you tell the user to do, they will do that, the opposite of that, and everything orthogonal to that.

    I’d declare each of the three types in my plist, and route them all to the same document class. The document would read from all three files regardless of which one it had been created with, and return an error if any of them were missing. You should probably appoint one of the three to be the document’s primary file, setting your fileURL to the URL to that file.

    Take care to implement File Coordination correctly (you should be a presenter for all three files and coordinate any attempts to write to any of them). You’ll be putting users at risk of data corruption or loss if you don’t.

    You should not attempt to mess with the Open panel at all. The Open panel is not the only way to open documents in a document-based app. The things you need to do, you need to do behind your GUI, not in it.

    If your app is sandboxed, this will be either tricky or impossible. Security-scoped URL bookmarks may help you here.

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

Sidebar

Related Questions

I have an application that uses NSDocument to open files. I have an NSView
Have deployed numerous report parts which reference the same view however one of them
I have an NSDocument subclass with two NSWindowControllers corresponding to 2 different xib. Following
I have a straightforward NSDocument -based Mac OS X app in which I am
I have an NSDocument which has the following structure: @interface MyDocument : NSDocument {
I have an NSDocument subclass for a simple text editor (using Lion's new document
I have a NSDocument based application, which allows the user to send messages, after
I have an NSDocument that contains a dataOfType method, but it is not called
I am writing an iPhone/iPad app where I have zipped files come in which
have written this little class, which generates a UUID every time an object of

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.