Dealing with validModesForFontPanel signature change
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=c5rpBX1cCp+IjiPxIpwvP49nm/4dQw7490S0/2ZNHvs=; b=d5Xio5pbQhFh6F5UrUKRqB/3kN2eLU1XNypIW6wOd6JBBD+bE0lM+BItDtLIzkvPuN KOCIvBzxln7VYKwJrI7KkHZ6zAhn+bcaxZp02LoqxJ1gtUtOiORY5ImJcIRJ6OhBpWlh WXvguupuKxgf7y8tAecrOit9/H/bdcV580FBKXNp4OHjEv4sv6f07XMkgZeXfxd+NGpp An/dAGFq5mh6hqvzOJ+pkEk5+earJYppCoF/B9L349+oak5fEJ5VgvycZOJQZ9dDemJU CE4yV0/ZZsaKvHAGZfXP6d3215BBnkKXpAMV2izqkaL748T4vGnC/UVQJvLThWf2kCj0 3l9Q== In the 10.13 SDK, the return type for NSObject.validModesForFontPanel() changed from Int to NSFontPanel.ModeMask. This is problematic for backwards compatibility because the different signature means it's considered to be a new function, different from the one that's been around since 10.3. If I simply update my function to match the new signature, then I have to change my deployment target to 10.13, which I'd rather not do just yet. I also tried going with the auto-fix suggestion of using @available to make the function 10.13 only. This would mean a minor loss of functionality on 10.12... but it doesn't work because my override isn't allowed to have different availability from the base version. I also tried installing the 10.12 SDK and building against that, but it's not compatible with Xcode 9 GM's Swift 3.2. So once I start using Xcode 9 regularly, I basically have to comment that function out until I want to require 10.13 for my app. Are there any other options? _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
David Catmull