On Jul 13, 2015, at 09:25 , Jan E. Schotsman <jesc...@xs4all.nl> 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 (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