[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: issue with auto-enable of Menus
From: |
Wolfgang Lux |
Subject: |
Re: issue with auto-enable of Menus |
Date: |
Mon, 13 Nov 2017 09:17:08 +0100 |
Hi Riccardo,
> if (action == @selector(copy:) || action == @selector(cut:) || action ==
> @selector(delete:))
you must use sel_isEqual to compare selectors in portable code, i.e.,
if (sel_isEqual(action, @selector(copy:)) || sel_isEqual(action,
@selector(cut:)) || sel_isEqual(action, @selector(delete:))
While sel_isEqual is just an alias for == on Apple's runtime (and the GNUstep
runtime, I assume), this need not be the case for other runtimes. In
particular, for the old GNU runtime sel_isEqual is not equivalent to ==, as
you've observed.
Wolfgang