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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:29:30+00:00 2026-06-05T10:29:30+00:00

This code makes my app to crash because awakeFromNib is invoked recursively: – (void)awakeFromNib

  • 0

This code makes my app to crash because awakeFromNib is invoked recursively:

- (void)awakeFromNib
{
    [super awakeFromNib];
        ...
        [[self window] setFrameTopLeftPoint:NSMakePoint(frame.origin.x, frame.origin.y)];
}

Is setFrameTopLeftPoint invoking awakeFromNib again ? I thought awakeFromNib is invoked only once, when the NSWindow is loaded by the XIB file.

How can I update a window position and size from awakeFromNib ?

thanks

  • 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-05T10:29:31+00:00Added an answer on June 5, 2026 at 10:29 am

    I don’t know why you’re getting infinite recursion in awakeFromNib. I created a test project mimicking your code and -awakeFromNib was only called once. I suspect it has something to do with the way you’re initializing your window controller.

    That said, updating the window position would probably be better done in -windowDidLoad. From the “Subclassing NSWindowController” section of the docs, it says:

    windowDidLoad: Override to perform tasks after the window nib file is
    loaded.

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

Sidebar

Related Questions

I make call from my app with this code (i use webview because after
I don't need this declaration because it only makes my code big and unreadable.
I have this code App.Model('users').find(function (err, users) { users.forEach(function(user) { console.log(user.username); }); }); //make
I'm trying to make a multithreaded server/client app with java ! this code is
So i have this code which makes a box, but want to make the
I have this code that makes a string and then echos the loop out
I just came a cross this nice code that makes this scatter matrix plot:
this line of the code makes the form see-through User32Wrappers.SetLayeredWindowAttributes(Me.Handle, 0, _ 255 *
In this C++ code, sorting the data ( before the timed region) makes the
First off I use this code to make the navigation bar always stay fixed;

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.