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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:26:41+00:00 2026-05-24T08:26:41+00:00

I have a NSDocument based application, which allows the user to send messages, after

  • 0

I have a NSDocument based application, which allows the user to send messages, after he has logged in.

These should be the user’s steps:

  • The user starts the App and logs in (credentials are stored in the user model)
  • The user user sends the first message
  • The user hits CMD + N and sends another message (without having to log in again)

The message model is placed in the MyDocument.xib. However the user model should be place in a global place (I would say MainMenu.xib).

My question is now:

  1. Does it make sense to put the model in the MainMenu.xib and how can I access it from MyDocument.m
  2. Is there maybe a better way to do this properly without having to make a singleton class?
  • 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-24T08:26:42+00:00Added an answer on May 24, 2026 at 8:26 am

    I would create an NSApplication delegate and then add you functionality in you delegate or an property of you delegate, you can then use [[NSApplicaton sharedApplicaton] delegate] to get you delegate. You application delegate is the place to associate model data that is common to you application.

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

Sidebar

Related Questions

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 a NSDocument based application with a nib that represents the visual document.
I have a document-based application and I have sub-classed NSDocument and provided the required
I have a document-based Cocoa application that has to start up a sub-process before
Have a n-tire web application and search often times out after 30 secs. How
I'm new to Mac programming and I'm working on a document-based application. My NSDocument
I am working on a document-based Cocoa application. At startup, the user is presented
I'm wondering if NSDocument is only for applications that are text/document-based. I have an
I'm using MacRuby 0.10 and XCode 4 where I have created a default NSDocument-based

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.