-
-
Notifications
You must be signed in to change notification settings - Fork 965
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
EditText UI element IsSelectionActive throws object reference error #2569
Comments
Providing some research I did for whom ever picks this up. Problem Work Around
Problem Explanation
Edit: Two suggestion for solutions
This |
The same code that is in the Update function is also in the getter for the UIElementServices: `
` So it seems to me that the code in the Update function should be unnecessary and that this issue will occur only if the root element doesn't have a UIElementServices defined. |
Release Type: Official Release
Version: 4.2.0.2282
Platform(s): Windows
Describe the bug
When enabling and focusing a EditText UI element using
IsSelectionActive = true
, the errorObject reference not set to an instance of an object
is thrown. However, the EditText element seems to be responsive and accepts input anyway.To Reproduce
Repro project: https://github.com/BlackCurtainStudio/Stride-EditTextSample
Expected behavior
No errors should occur.
Screenshots
Log and callstacks
[EditTextSample.UiScript]: Error: Object reference not set to an instance of an object. [EditTextSample.UiScript]: Error: at Stride.Core.ServiceRegistryExtensions.GetSafeServiceAs[T](IServiceRegistry registry) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\ServiceRegistryExtensions.cs:line 22 at Stride.UI.Controls.EditText.ActivateEditTextImpl() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.UI\Controls\EditText.Direct.cs:line 125 at Stride.UI.Controls.EditText.set_IsSelectionActive(Boolean value) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.UI\Controls\EditText.cs:line 160
The text was updated successfully, but these errors were encountered: