• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: problem loading a window in a new NIB using NSWindowController.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem loading a window in a new NIB using NSWindowController.


  • Subject: Re: problem loading a window in a new NIB using NSWindowController.
  • From: Fritz Anderson <email@hidden>
  • Date: Wed, 3 Oct 2007 14:04:10 -0500


On 3 Oct 2007, at 1:40 PM, deepak gopal wrote:

I am trying to load a Nib File Using the code below. [myWindowController window] crashes the app.

"Crashes the app" isn't very informative. Does the application crash at the very spot of the call? At some point deeper in the call chain from [myWindowController window]? Later? What is the stack trace at the point of the crash?


NSWindowController *myWindowController = [[[MyWindowController alloc] initWithWindowNibName:@"SymbolsView"] autorelease];

Why are you autoreleasing your window controller? Don't you want it to exist after the next pass through the run loop?


[[myWindowController window] makeKeyAndOrderFront:nil];

When do you execute this line? In the same function as the alloc/ autorelease? Or later, after myWindowController has been released out from under you?


	— F
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >problem loading a window in a new NIB using NSWindowController. (From: deepak gopal <email@hidden>)

  • Prev by Date: problem loading a window in a new NIB using NSWindowController.
  • Next by Date: Image + Text NSCell subclass
  • Previous by thread: problem loading a window in a new NIB using NSWindowController.
  • Next by thread: Re: problem loading a window in a new NIB using NSWindowController.
  • Index(es):
    • Date
    • Thread