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

  • Home
  • SEARCH
  • 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 4028164
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:11:12+00:00 2026-05-20T11:11:12+00:00

When going through some sample code, notice that setting the main Window Title in

  • 0

When going through some sample code, notice that setting the main Window Title in IB has no effect when the “create document-based application” option is chosen. The Window would come out with “Untitled” as its title. And we need to override – (NSString *) displayName {} in MyDocument : NSDocument inorder to set the window title. Just wish that some experts in xcode can explain why this is so. That is, what is added to the system when we check the “create document-based application” option when the project is initially generated ?

  • 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-20T11:11:13+00:00Added an answer on May 20, 2026 at 11:11 am

    Understand that when you create a project from a template in Xcode, Xcode doesn’t really generate any code. Sure, it might fill in a few blanks with your name, your project name, etc. But what you’re getting is essentially canned starter code for the type of project you’ve chosen. What’s being added when you check the ‘document based’ option is a NSDocument subclass customized with a reasonable name for your app.

    Take a look at Apples “Human Interface Guidelines”, such as this, and you’ll see that document windows are supposed to be titled based on the document that they’re displaying. For that reason, the default behavior for a document-based application is to set the title to the filename of the document file.

    Finally, look at the reference page for NSDocument and you’ll find that the behavior you’re seeing is part of the NSDocument class. In particular, if you look at the -displayName method, you’ll find information about how to properly customize the window title.

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

Sidebar

Related Questions

I was going through some code and came across a scenario where my combobox
I am going through some pl/sql code with no comments. Trying to make sense
I'm going through some old stored procedures at work and constantly come across CASE
I am going through some exam questions for the 70-536 exam and an actual
I was looking at some sample code on Jeff LaMarche's excellent blog when I
I was going through someone's code where I came across a thread: while(TRUE) {
While going through university and from following the development of SO, I've heard a
After going through the Appendix A, C# Coding Style Conventions of the great book
I'm going through the problems on projecteuler.net to learn how to program in Erlang,
We're going through a massive migration project at the minute and trying to validate

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.