Crash when "loading" window second time

2008-11-23 Thread Ulai Beekam
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(@"load

Re: Crash when "loading" window second time

2008-11-23 Thread Kyle Sluder
On Fri, Nov 21, 2008 at 6:19 PM, Ulai Beekam <[EMAIL PROTECTED]> wrote: > }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 t

Re: Crash when "loading" window second time

2008-11-23 Thread Jonathan Hess
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

RE: Crash when "loading" window second time

2008-11-24 Thread Ulai Beekam
eckbox 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 Ul