Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update SelectAllTextBehavior doc to explain .net non-runtime issue #411

Conversation

TrueMoniker
Copy link

The SelectAllTextBehavior cannot be referenced from a project that runs .NET without a native runtime. Because of the way unit tests run in Maui, it's common to have a version of .NET as the target framework. Adding a note at the top of the document could save someone from implementing it in a project that is .NET only.

Copy link

Learn Build status updates of commit 9cb7eef:

✅ Validation status: passed

File Status Preview URL Details
docs/maui/behaviors/select-all-text-behavior.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@bijington
Copy link
Collaborator

bijington commented Apr 28, 2024

The project the behavior is contained within does support .NET (see https://github.com/CommunityToolkit/Maui/blob/main/src/CommunityToolkit.Maui/CommunityToolkit.Maui.csproj).

I wonder if the XAML compiler isn't retaining the type. If you try adding this line somewhere in your tests does it solve the issue?

_ = new SelectAllTextBehavior();

@TrueMoniker
Copy link
Author

@bijington Thank you for the suggestion. I tried it but had the same error. I have created an example project in this repo.
I didn't create an issue originally because I thought this behavior was intentional. Should I create an issue rather than the doc update?

@bijington
Copy link
Collaborator

@bijington Thank you for the suggestion. I tried it but had the same error. I have created an example project in this repo. I didn't create an issue originally because I thought this behavior was intentional. Should I create an issue rather than the doc update?

Thanks for providing your sample. So I think this is a bug in the toolkit. All of our other behaviours have an implementation for plain netX TFMs but SelectAllTextBehavior doesn't.

@bijington
Copy link
Collaborator

I have raised the bug here: CommunityToolkit/Maui#1847. For now I will close this PR down as I think we should make a change to the code instead.

@bijington bijington closed this Apr 29, 2024
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.

2 participants