Re: Terminate app
Re: Terminate app
- Subject: Re: Terminate app
- From: Quincey Morris <email@hidden>
- Date: Mon, 13 Jul 2015 16:48:41 +0000
On Jul 13, 2015, at 09:25 , Jan E. Schotsman <email@hidden> wrote:
>
> NSApplication.terminate(self) // ! Cannot invoke 'terminate' with an argument list of type '(AppDelegate)'
You’re mistakenly invoking the method on the class, not on the application instance. Try:
NSApplication.sharedApplication.terminate(self)
Note that in Swift, you can write SomeClass.instanceMethod (instanceOfSomeClass, …) as an equivalent of instanceOfSomeClass.instanceMethod (…), and the error message you got is helpfully trying to show you how to do that. :)
_______________________________________________
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
References: | |
| >Terminate app (From: "Jan E. Schotsman" <email@hidden>) |