Re: Unable to Terminate Application
Re: Unable to Terminate Application
- Subject: Re: Unable to Terminate Application
- From: Shawn Erickson <email@hidden>
- Date: Tue, 30 Mar 2004 14:00:44 -0800
On Mar 30, 2004, at 12:04 PM, Frederick C. Lee wrote:
Greetings:
I tried to terminate an application manually, by calling my 'dealloc'
method.
Whose dealloc method? ...and are you actually calling it directly? If
so you shouldn't do that but release as needed, which will get dealloc
called for you automatically.
In it, I have [NSApp terminate] to terminate the application.
It appeared to be straight forward, but I've encountered the
'...selector not recognized'.
Question: what selector? ... and what's the remedy?
I think the below answers your question about which selector...
2004-03-30 11:53:06.281 AreaCode[3711] *** -[NSApplication terminate]:
selector not recognized
You are trying to send terminate to the NSApplication class not to an
instance of that class, terminate is an instance method. You use
sharedApplication to get your applications NSApplication instance.
[[NSApplication sharedApplication] terminate];
-Shawn
_______________________________________________
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.