Apologies for a newbie question.

I've just tried my first normal Mac application in Xcode (so far I had only created an iOS app and a Mac screensaver).

Everything went fine (after I fixed an incorrect alloc), but it's what happens at the end of the app's (apparent) lifetime that has got me slightly bemused. I'm running this under the debugger, if that makes a difference.

If I Command-Q the main window, the debug session terminates as expected. If I only click the close button, the window vanishes but debugging doesn't stop. It took me a few minutes to figure out that this wasn't something dumb I'd done, but standard Mac app behaviour, whereby it hides for fast startup next time rather than actually quits (I *think* I've got that right?).

To confirm that that was what was happening, I tried to trap applicationDidHide: - so I literally added

- (void)applicationDidHide:(NSNotification *)aNotification
{
}

into the delegate's .m file. I'm confident that I don't need anything to match in the .h file as this is an override, and applicationDidFinishLaunching: isn't in the .h file either.

I have a breakpoint in there (on a dummy variable initialisation), but it doesn't get hit when I click the main window's close button.

Have I misunderstood something?

Thanks in advance.

--
Jason Teagle
_______________________________________________

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

This email sent to arch...@mail-archive.com

Reply via email to