Hi again,Actually the previous poster idea about unchecking the "release" 
checkbox in Interface builder works.I wonder then, why don't I have to uncheck 
this box when using a controller object that inherits from 
NSWindowController?Also, Hillegass didn't mention this checkbox before in the 
book. Does this mean I'm using the wrong approach?Thanks,U> From: [EMAIL 
PROTECTED]> CC: cocoa-dev@lists.apple.com> Date: Sun, 23 Nov 2008 14:27:11 
-0800> Subject: Re: Crash when "loading" window second time> To: [EMAIL 
PROTECTED]> > Hey Ulai -> > Do you have a backtrace for the crash?> > If you 
think the problem has to do with the aboutWindow outlet being  > referenced 
after the window has been dealloced, you could nil out the  > aboutWindow 
outlet in response to a windowDidCloseClose: delegate  > method.> > Jon Hess> > 
On Nov 21, 2008, at 3:19 PM, Ulai Beekam wrote:> >>>> Hi,I'm trying to do the 
exercise on p. 195 in Hillegass (3rd  >> Edition).I have put this line in the 
AboutController.h header:   >> IBOutlet NSWindow *aboutWindow;And I have put 
these lines in  >> AboutController.m file:- 
(IBAction)showAboutPanel:(id)sender>> {>>  if (aboutWindow == nil)>>  {>>    
NSLog(@"loading about.nib");>>    [NSBundle loadNibNamed:@"About" 
owner:self];>>  }>>>>  [aboutWindow makeKeyAndOrderFront:self];>> }Now, the 
about window appears great the first time I go to the menu  >> and hit "About 
App". But if I close the about window, and hit the  >> "About App" menu item 
again, my program crashes! Any ideas why? I  >> actually believe the crash is 
caused by the aboutWindow outlet being  >> destroyed when the window closes. 
How can I prevent this crash? >> Thanks,U.>> 
_________________________________________________________________>> News, 
entertainment and everything you care about at Live.com. Get  >> it now!>> 
http://www.live.com/getstarted.aspx_______________________________________________>>>>
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)>>>> 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:>> 
http://lists.apple.com/mailman/options/cocoa-dev/jhess%40apple.com>>>> This 
email sent to [EMAIL PROTECTED]> 
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to