[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69525: 30.0.50; MacOS: New warnings on stderr
From: |
Alan Third |
Subject: |
bug#69525: 30.0.50; MacOS: New warnings on stderr |
Date: |
Fri, 26 Jul 2024 20:09:35 +0100 |
On Fri, Jul 26, 2024 at 12:33:24PM +0200, Gerd Möllmann wrote:
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>
> > Alan Third <alan@idiocy.org> writes:
> >
> >>> >>> 2024-03-03 17:10:35.434255+0100 emacs[12805:61381] [CursorUI]
> >>> >>> -[TUINSCursorUIController activate:]: EmacsView doesn't conform to
> >>> >>> NSTextInputClient protocol.
> >>
> >> I don't have the first clue about this one. NSTextInputClient has
> >> apparently been around since macOS 10.5, and I haven't heard of this
> >> problem before... EmacsView *should* conform to NSTextInputClient
> >> because it's a subclass of NSView.
> >
> > I've now compared Apple's docss at
> >
> > https://developer.apple.com/documentation/appkit/nstextinputclient
> >
> > with what's in nsterm.m, and I think it's indeed different. (Add usual
> > disclaimer that I know neither ObjC nor NS.)
> >
> > Apple:
> > func setMarkedText(Any, selectedRange: NSRange, replacementRange: NSRange)
> > Replaces a specified range in the receiver’s text storage with the given
> > string and sets the selection.
> > Required
> >
> > nsterm.m
> > - (void)setMarkedText: (id)aString selectedRange: (NSRange)selRange
> >
> > func validAttributesForMarkedText() -> [NSAttributedString.Key]
> > Returns an array of attribute names recognized by the receiver.
> > Required
> >
> > - (NSArray *)validAttributesForMarkedText
> >
> > func attributedSubstring(forProposedRange: NSRange, actualRange:
> > NSRangePointer?) -> NSAttributedString?
> >
> > - (NSAttributedString *)attributedSubstringFromRange: (NSRange)theRange
> >
> > func insertText(Any, replacementRange: NSRange)
> > Inserts the given string into the receiver, replacing the specified
> > content.
> > Required
> >
> > - (void)insertText: (id)aString
> >
> > Stopped here.
FYI, up at the top right of the Apple docs you can change from Swift
to Objective C, which will probably make comparisons easier.
> Apple's documentation says
>
> Important
>
> NSTextInput protocol is slated for deprecation. Please use the
> NSTextInputClient protocol instead.
>
> I guess that's the reason for the warning, and we should switch to using
> NSTextInputClient.
Looks that way. AFAICT NSTextInputClient should be available on all
versions of macOS we support and also in GNUstep, although it can be
hard to tell which versions of GNUstep support what.
Some of these functions are just used for normal input, but many of
them are used exclusively for macOS input methods.
--
Alan Third
- bug#69525: 30.0.50; MacOS: New warnings on stderr, Gerd Möllmann, 2024/07/26
- bug#69525: 30.0.50; MacOS: New warnings on stderr, Gerd Möllmann, 2024/07/26
- bug#69525: 30.0.50; MacOS: New warnings on stderr, Eli Zaretskii, 2024/07/26
- bug#69525: 30.0.50; MacOS: New warnings on stderr,
Alan Third <=
- bug#69525: 30.0.50; MacOS: New warnings on stderr, Gerd Möllmann, 2024/07/26
- bug#69525: 30.0.50; MacOS: New warnings on stderr, Alan Third, 2024/07/26
- bug#69525: 30.0.50; MacOS: New warnings on stderr, Gerd Möllmann, 2024/07/26
- bug#69525: 30.0.50; MacOS: New warnings on stderr, Eli Zaretskii, 2024/07/27
- bug#69525: 30.0.50; MacOS: New warnings on stderr, Gerd Möllmann, 2024/07/30
- bug#69525: 30.0.50; MacOS: New warnings on stderr, Gerd Möllmann, 2024/07/30
- bug#69525: 30.0.50; MacOS: New warnings on stderr, Eli Zaretskii, 2024/07/31