Re: 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=teal.net; s=teal; h=received:x-smartermail-authenticated-as:received:from:message-id:content-type: mime-version:subject:date:in-reply-to:cc:to:references:x-mailer; bh=hJsJSwL85Ze6bt9lY+2uIlTlY6IygKjUTMsVN0VhPXw=; b=ifcAtbn5ssbqs5+c2cbh2oNgW7WQeaR78B+k03JIhLre4+w+gZIsCJWyR87dFqILL8U2PU/x3SyA1 9dFLl1XR4mTz2A87FNg/nR73LC1MsWocaumcUBghmZdqQxlbkSX/VlSlBs72isky5SXwPZe9r0Z8HZ hapHV9ZIZwdtnzH0= On Sep 14, 2017, at 09:07 , David Catmull <davidcatmull@gmail.com> wrote:
Are there any other options?
It looks like an unintentional error in the 10.13 SDK. If you look at other “enforcement” types, such as Notification.Name, they’ve been given a backwards-compatible availability, since they are value-compatible. (They have to be, because the Cocoa methods haven’t changed.) I don’t see any immediate solution within Swift syntax. The only solution I can think of is to use an Obj-C “bridge", where you implement the override method in Obj-C, and have the override call a Swift method that doesn’t use the MaskMode type. (The old numeric masks are still available in the 10.13 SDK as deprecated global constants.) Unfortunately, this is a bit messy to do. The cleanest way I can think of is to create a NSObject subclass (in Obj-C) that has the override and a dummy Swift-compatible replacement method that the override calls. Your class would then subclass this, and override the dummy method. Make sure you submit a bug report. If the availability is intentional, then they need at least to be able to tell you how to write the override with backward compatibility. _______________________________________________ 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)
-
Quincey Morris