dotnet / dotnet/macios

macOS: NSTextView does not implement INSStandardKeyBindingResponding

Open
#8,374 2 comments 2 reactions 0 assignees View on GitHub
api-bindings bug generator macOS
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 13h
Merged PRs (30d)
96

Description

### Steps to Reproduce / Expected Behavior
I was attempting to call "[insertNewlineIgnoringFieldEditor:](https://developer.apple.com/documentation/appkit/nsstandardkeybindingresponding/3005218-insertnewlineignoringfieldeditor?language=objc)" on a `NSTextView`, but it wasn't possible.
[NSTextView](https://developer.apple.com/documentation/appkit/nstextview) conforms to protocol [NSStandardKeyBindingResponding](https://developer.apple.com/documentation/appkit/nsstandardkeybindingresponding?language=objc) so I thought it should be possible, but it is not.

### Actual Behavior
Seems like the Xamarin NSTextView does not implement [INSStandardKeyBindingResponding](https://docs.microsoft.com/en-us/dotnet/api/appkit.insstandardkeybindingresponding?view=xamarin-mac-sdk-14).

I worked around it by calling `textView.PerformSelector(new Selector("insertNewlineIgnoringFieldEditor:");)` directly.

I saw that this problem is already logged [here](https://github.com/xamarin/xamarin-macios/blob/8d3987b84a489e1ffd6fd825c1207b35f4a9fd32/tests/xtro-sharpie/macOS-AppKit.ignore#L1084) and I am curious: Is this file like a backlog for missing bindings that you intent to implement over time or do you wait for issues to be created (like this one) asking for implementation of these APIs? I don't want to bother you every time I see a missing binding :)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.