Re: Thoughts on Cocoa source code
Re: Thoughts on Cocoa source code
- Subject: Re: Thoughts on Cocoa source code
- From: Jens Alfke via Cocoa-dev <email@hidden>
- Date: Wed, 9 Oct 2019 15:14:51 -0700
> On Oct 9, 2019, at 11:39 AM, Aandi Inston <email@hidden> wrote:
>
> * But for whatever reason, I'm using the Mac OS 10.14 SDK. So that will get a
> compile-time warning.
Only if you don't turn on -Werror, which I really, really recommend everyone
do. Calling a method that a class isn't declared as implementing is a fairly
common mistake, and warnings are way too easy to overlook.
In this situation, you get around the warning/error by declaring the method
yourself in a category on the framework class.
> * I add a check for actual OS version, so I am very sure not try to call
> [NSApplication doUsefulThing]
> unless the OS is 10.15 or later.
> * But what happens if it runs in 10.15? Does it actually do the useful thing?
The method will be called, yes. I can't think of any particular reason it
wouldn't work.
—Jens
_______________________________________________
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