• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Thoughts on Cocoa source code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thoughts on Cocoa source code


  • Subject: Re: Thoughts on Cocoa source code
  • From: Jean-Daniel via Cocoa-dev <email@hidden>
  • Date: Thu, 10 Oct 2019 01:12:34 +0200


> Le 10 oct. 2019 à 00:14, Jens Alfke via Cocoa-dev <email@hidden>
> a écrit :
>
>
>
>> 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.

It may not work if -doUsefulThing rely on some code that performs a « Link SDK
version » runtime check and assume the new code path wlll be executed because
this method is not supposed to be called from a app linked on an older SDK..

This is rather unlikely, but this is usually safer to update your SDK if you
want the last features.


_______________________________________________

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: 
 >Thoughts on Cocoa source code (From: Turtle Creek Software via Cocoa-dev <email@hidden>)
 >Re: Thoughts on Cocoa source code (From: Jens Alfke via Cocoa-dev <email@hidden>)
 >Re: Thoughts on Cocoa source code (From: Aandi Inston via Cocoa-dev <email@hidden>)
 >Re: Thoughts on Cocoa source code (From: Jens Alfke via Cocoa-dev <email@hidden>)

  • Prev by Date: Re: Thoughts on Cocoa source code
  • Next by Date: Re: Thoughts on Cocoa source code
  • Previous by thread: Re: Thoughts on Cocoa source code
  • Next by thread: Re: Thoughts on Cocoa source code
  • Index(es):
    • Date
    • Thread