Re: Unable to Terminate Application
Re: Unable to Terminate Application
- Subject: Re: Unable to Terminate Application
- From: Smith Kennedy <email@hidden>
- Date: Tue, 30 Mar 2004 15:24:41 -0700
Hi,
The Cocoa documentation for NSApplication is pretty clear on this.
Either:
[[NSApplication sharedApplication] terminate];
or
[NSApp terminate];
which is basically a different phrasing of the same thing.
You may want to buy "Learning Cocoa" or find a similar resource(ADC?)
to have it walk you through some tutorials and a better introduction to
the Foundation and AppKit frameworks. Just knowing Objective-C won't
teach you all that you need to know about Cocoa, the same way that
learning any language is nearly pointless without understanding the
standard frameworks and libraries you will be using in that language.
This is all kind of off topic for xcode-users, IMHO. :-)
Smith
On Mar 30, 2004, at 2:51 PM, Frederick C. Lee wrote:
You're probably right.
I'm a novice at this.
I'm in my application's controller object (MVC) of a simple test
application.
I want to terminate the application manually. For example, when the
user enters null data.
I thought I could just 'terminate' the application. Apparently this
is more involved.
Hence, I would like to know the proper procedure to terminate a Cocoa
application (without documents).
This is a simple application involving a simple window, essentially.
Ric.
On Mar 30, 2004, at 1:19 PM, Markus Hitter wrote:
Am 30.03.2004 um 22:04 schrieb Frederick C. Lee:
- (void)dealloc
{
NSLog(@"Inside dealloc.");
[NSApp terminate];
Are you sure this is good design? From within the child you try to
terminate the parent. The parent whould try to deallocate the child
again ... until stack fills up ...
Markus
- - - - - - - - - - - - - - - - - - -
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.
_______________________________________________
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.
_______________________________________________
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.