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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:52:35+00:00 2026-06-05T07:52:35+00:00

Can you please explain me when we have to use the methods ? and

  • 0

Can you please explain me when we have to use the methods ? and also in what sort of situation should we use which method ? Right now i test which works and use that (yea i am a beginner)..
Thanks. I am developing for MAC.

  • 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-05T07:52:38+00:00Added an answer on June 5, 2026 at 7:52 am

    First, you should never call awakeFromNib and windowDidLoad yourself. You can implement them in your custom classes, and then Cocoa will call them at the appropriate time.

    awakeFromNib works for all objects loaded from a nib archive, not just windows and window controllers. It’s a good general place to do setup—it’s safe (you’re guaranteed that the object is fully loaded, has returned from its init call, and has all of its outlets set), but still pretty early.

    windowDidLoad (and windowWillLoad) works for all windows, whether loaded from a nib archive or created on the fly. But it’s not called on the window, it’s called on the window’s controller. (Usually you’re not creating your own NSWindow subclass, but you are creating your own NSWindowController subclass.) If you have setup code that depends on the window being loaded, you should put it here (but it’s actually not that critical in the simple cases, because as soon as you try to access the window property, it will be created).

    initWithWindow: is something you do call yourself, but a beginning Cocoa programmer probably doesn’t ever want to do so.

    You should probably read some of the guides that come with Xcode. If you want a document-based app, start with “Document-Based App Programming Guide for Mac”. If you want a single-window utility app, you’ll still need to learn about MVC and so on, so you might actually want to build a document-based app first to learn your way around.

    Also, if you want to understand the sequence of events, override every message you can, and add something like NSLog(@”%s”, __FUNCTION__); and your syslogs will reveal everything.

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

Sidebar

Related Questions

I have a feeling this XML is not valid, can someone please explain why?
Can somebody please explain how to use macros in x86 assembly coding
Can anyone please explain me what is DataContractTranslstor and what's it's use?
Can somebody please explain to me how to properly test Postgres DB errors, particularly
Can someone please explain to me how can I have a download link appear
Can someone please explain to me the difference between the AppSettings and ApplicationSettings sections
Can someone please explain how to understand a logcat from an android force close.
Can anyone please explain to me why the following two queries yield different results?
Can someone please explain the major differences between Scala, Groovy and Clojure. I know
Can someone please explain why IE7 insists on putting a space between the table

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.