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: deepak gopal <email@hidden>
- Date: Thu, 4 Oct 2007 02:57:24 +0530 (IST)
Answers below.
----- Original Message ----
From: Fritz Anderson <email@hidden>
To: deepak gopal <email@hidden>
Cc: cocoa dev <email@hidden>
Sent: Wednesday, 3 October, 2007 12:04:10 PM
Subject: Re: problem loading a window in a new NIB using NSWindowController.
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?
The application crashes at the very spot I call [myWindowController window]
> 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?
No I won't need it for the next pass, this doesn't affect the next statement, does it?
> [[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?
I execute it in the same function.
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
Save all your chat conversations. Find them online at http://in.messenger.yahoo.com/webmessengerpromo.php
_______________________________________________
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