Re: problem loading a window in a new NIB using NSWindowController.
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