-
Notifications
You must be signed in to change notification settings - Fork 37
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
OnChange attribute does not work for Choice options #367
Labels
Comments
Un-assigned myself cause I just don't have the motivation outside of work to dig super deep into weird generics again, for a start at some debug logs you can check JKohlman@88e63a4. TLDR is it's generics, always has been |
Example of the issue: Nautilus/Example mod/ConfigExamples.cs Lines 144 to 186 in 83b6874
|
Minimized reproduction: [Choice("TestOption", options: new[] { "Choice One", "Choice Two" })]
[OnChange(nameof(OnTestOptionChange))]
public string choiceValue = "Choice One";
public void OnTestOptionChange<T>(object sender, ChoiceChangedEventArgs<T> e)
{
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If a choice option has the OnChange attribute, an exception is thrown upon value change (after the option's value has been saved and recognized).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No exception (callback method should be actually called properly).
Screenshots
The text was updated successfully, but these errors were encountered: