Fix deprecation warning regarding NSOKButton on 10.10+. #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?