Skip to content

Conversation

@mwcampbell
Copy link
Contributor

This should be on par with the Windows adapter, meaning support for single-line and multi-line edit controls, but without exposing text formatting attributes or other rich text features. To test with a real toolkit implementation, use this egui branch. egui itself required only one minor fix, which is already merged; the existing integration in egui that was tested with the Windows adapter was mostly fine already.

@mwcampbell
Copy link
Contributor Author

I'm aware that the new functions for converting to and from indices are O(n), where n is the number of lines or even characters. I know this won't scale to huge chunks of text, but I've decided not to bother with caching or the like until we know that we need it. After all, cache invalidation is one of the hardest problems in computer science.

@trypsynth
Copy link

I don't even think AppKit bothers with caching as far as that goes, because when in a large text field, pressing command+down to try to jump to the end causes the application to lock up for a good while. If not lock up, at the very least, make VoiceOver think it went not responding. I'm unsure if it also blows up for sighted users, but I doubt it.
This freeze period is longer on Intel Macs, but still happens on M1's. If this proves to be a problem you can look into it, but I wouldn't stress it.

Copy link
Member

@DataTriny DataTriny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me, but I'd prefer if someone with MacOS development knowledge could have a look.

@mwcampbell
Copy link
Contributor Author

@spencerudnick Can you please review this one?

Copy link

@rain-sk rain-sk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, everything looks good to me. Though I had one question about claiming to support setAccessibilityValue: without actually implementing it.

@mwcampbell mwcampbell merged commit 3a35dbe into main Dec 17, 2022
@mwcampbell mwcampbell deleted the macos-basic-text branch December 17, 2022 18:23
@github-actions github-actions bot mentioned this pull request Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants