• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dealing with validModesForFontPanel signature change
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dealing with validModesForFontPanel signature change


  • Subject: Re: Dealing with validModesForFontPanel signature change
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 14 Sep 2017 10:32:58 -0700

On Sep 14, 2017, at 09:07 , David Catmull <email@hidden> 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 (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

References: 
 >Dealing with validModesForFontPanel signature change (From: David Catmull <email@hidden>)

  • Prev by Date: Dealing with validModesForFontPanel signature change
  • Next by Date: Inserting a button into another application's toolbar
  • Previous by thread: Dealing with validModesForFontPanel signature change
  • Next by thread: Inserting a button into another application's toolbar
  • Index(es):
    • Date
    • Thread