Re: Unable to Terminate Application
Re: Unable to Terminate Application
- Subject: Re: Unable to Terminate Application
- From: Markus Hitter <email@hidden>
- Date: Wed, 31 Mar 2004 00:24:30 +0200
Am 30.03.2004 um 23:51 schrieb Frederick C. Lee:
I thought I could just 'terminate' the application.
You can. But not from within a method which might be called when the
app is actually terminated. Doing it in one of your action methods is
fine.
Hence, I would like to know the proper procedure to terminate a Cocoa
application (without documents).
It's [NSApp terminate:self]. Note the additional argument.
Obj-C allows methods with the same base name but differently named/a
different count of arguments. You'll never get an "1 arguments expected
but 0 given" error in Obj-C.
HTH,
Markus
P.S.: When terminating, don't count on -dealloc messages being sent. If
you have to do some clean up on -terminate, look up
-applicationWillTerminate: ...
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.