• 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
Crash when "loading" window second time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Crash when "loading" window second time


  • Subject: Crash when "loading" window second time
  • From: Ulai Beekam <email@hidden>
  • Date: Fri, 21 Nov 2008 23:19:11 +0000
  • Importance: Normal

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 (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

  • Follow-Ups:
    • Re: Crash when "loading" window second time
      • From: Jonathan Hess <email@hidden>
    • Re: Crash when "loading" window second time
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Different result with NSURLRequest then with curl (or browser)
  • Next by Date: Different result with NSURLRequest then with curl (or browser)
  • Previous by thread: Different result with NSURLRequest then with curl (or browser)
  • Next by thread: Re: Crash when "loading" window second time
  • Index(es):
    • Date
    • Thread