Re: Conditional Compilation for 10.9/10.10...
Re: Conditional Compilation for 10.9/10.10...
- Subject: Re: Conditional Compilation for 10.9/10.10...
- From: Quincey Morris <email@hidden>
- Date: Fri, 02 Jan 2015 19:14:29 +0000
On Jan 2, 2015, at 09:35 , Peters, Brandon <email@hidden> wrote:
>
> I am trying set up my application to do some condition compilation to address a deprecated method in 10.9 that has been replaced in 10.10 with another method. I am running Xcode Version 6.2 (6C86e, beta). Here is the code:
>
> #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_9
>
> -(NSRect)constrainBoundsRect:(NSRect)proposedBounds {
I’m pretty sure I don’t want to get tangled up in this, because I’m very bad at OS-version-dependent reasoning, but I’ll point out that ‘constrainBoundsRect:’ was apparently introduced in 10.9, not 10.10. OTOH, ‘constrainScrollPoint:’ was informally deprecated in 10.9, and only formally deprecated in 10.10.
It’s not clear to me whether you’re trying to distinguish between 10.9 vs 10.10, or 10.8- vs 10.9+. Your comments suggest the former, but if so you don’t actually have to make the distinction.
If the latter, then shouldn’t the test be ‘>=‘ rather than ‘<=‘? If you’re trying to *override* ‘constrainBoundsRect:’, you need a deployment target of at least 10.9. OTOH if you’re trying to supply the “missing” ‘constrainBoundsRect:’, then you really shouldn’t do that — you don’t know if it might have been a private method previously.
On top of all that, according to the NSClipView.h header file, there is a compatibility mode if the deprecated ‘constrainScrollPoint:’ is actually overridden, so it’s possible that none of this is actually necessary.
But I’m probably confused …
_______________________________________________
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