Skip to content

Conversation

@jpetrie
Copy link
Contributor

@jpetrie jpetrie commented May 16, 2015

I've been fixing some of the deprecation (and other) warnings and static analysis issues in my local fork. Before I continued doing so I wanted to send a PR for one of the simpler ones to make sure I'm handling things the right way.

This commit addresses two warnings regarding the use of NSOKButton, which was deprecated in 10.10 in favor of NSModalResponseOK. The change itself is very simple; I'd like guidance on handling the versioning, however.

In general I've guarded deprecation changes by testing against the OS version the deprecation was introduced in (10.10 in this case) to avoid changing the behavior for an "older" build. This will let somebody build a binary against older deployment targets if desired, but they'll still need the latest SDK (to see the appropriate availability macros).

Is this sufficient or should I also take steps to make sure I check the SDK version somehow before doing the availability check? I don't really see this being done elsewhere, but MacVim.h does have a redefinition of the OS version macros up to 10.7; should I add the ones through 10.10 if I'm going to be using them?

douglasdrumond added a commit that referenced this pull request May 28, 2015
Fix deprecation warning regarding NSOKButton on 10.10+.
@douglasdrumond douglasdrumond merged commit b834a6d into macvim-dev:master May 28, 2015
@douglasdrumond
Copy link
Member

Looks good to me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants