Subject: bug#69525: 30.0.50; MacOS: New warnings on stderr

From: Gerd Möllmann <[email-masked]>
Date: Fri, 26 Jul 2024 12:33:24 +0200

Gerd Möllmann <[email-masked]> writes:

> Alan Third <[email-masked]> 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.

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.