[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac OS Sierra tab feature breaks C-x 5 2

From: Anders Lindgren
Subject: Re: Mac OS Sierra tab feature breaks C-x 5 2
Date: Sun, 16 Jul 2017 20:43:25 +0200

On Thu, Jul 13, 2017 at 10:22 PM, Alan Third <address@hidden> wrote:
On Wed, Jul 12, 2017 at 11:20:57PM +0200, Anders Lindgren wrote:
> The end result would look like:
>       if ([win respondsToSelector: @selector(setTabbingMode:)])
>         [win setTabbingMode: NSWindowTabbingModeDisallowed];

I like this option, but after a lot of messing about I’m pretty sure
that gcc doesn’t let you silence this warning.

Unfortunately, I came to the same conclusion.

So, unless we don’t care about gcc warnings for the NS build, we could
try using performSelector:

    [win performSelector: @selector(setTabbingMode:)
              withObject: (id)NSWindowTabbingModeDisallowed];
Which only supports one parameter, so works here but not necessarily
anywhere else we might want to try this.

It doesn't feel right, as it bypasses all type checking even when building on modern systems. And, as you mentioned, it only supports one parameter.

I tried to figure out if gcc or clang was used when building on 10.6.8, but ran out of time (and won't have the chance to do it again anytime soon). I did conclude that it comes with both a real "gcc" and a real "clang", so presumably gcc is used. (Surprisingly, more modern versions of macOS seems to map the command "gcc" to "clang".)

A warning-free build is a must on modern system (which use clang). It would be nice on older system, I guess, but it would be hard to enforce. (We could even lobby to add the option to future gcc versions, for the benefit of GNUStep, but it would not help the situation on older macOS versions.)

Or back to the first suggestion and fake the methods when they’re not
there. But that doesn’t help get rid of the need for multiple

Not an appealing solution.

My gut feeling is to go with the NS_SILENCE_MISSING_METHOD_WARNING_BEGIN solution, as it work on modern macOS systems, it retains type checking, and it give us a single location to describe the situation and to modify the macro, if there should be a need for it in the future.

    -- Anders

reply via email to

[Prev in Thread] Current Thread [Next in Thread]