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

You have to click outside the block to get warning indicator removed after variable rename #15

Open
mark-friedman opened this issue Oct 21, 2021 · 4 comments
Labels
bug Something isn't working enhancement New feature or request lexical variables Use this tag for the lexical variable plugin

Comments

@mark-friedman
Copy link
Collaborator

You shouldn't have to do that. I think that you don't have that behavior in App Inventor, so the bug was introduced when adapting the code for the plugin.

@mark-friedman mark-friedman added bug Something isn't working enhancement New feature or request lexical variables Use this tag for the lexical variable plugin labels Oct 21, 2021
@mark-friedman
Copy link
Collaborator Author

Here's a little video showing the behavior. Note that the warning indicators don't go away until I click outside the variable name field.

Screen.Recording.2023-05-11.at.2.25.13.PM.mov

@mark-friedman
Copy link
Collaborator Author

Note further, that there shouldn't be any warning indicators at all in this case.

@BeksOmega
Copy link
Collaborator

Dug into this this morning! Sorry it took me so long to investigate. I think the difference between this an App Inventor is probably related to how App Inventor handles setting field values differently.

So what's happing is that the lexical variable field's validator is triggering the warning check, but the validator runs before the field's value is actually set. So at the time it checks for warnings, name2 is actually incorrect, because the value of the field is still name.

To solve this I think you can just remove the validator! You're already checking for warnings on every event, so no need to do it an extra time for these fields.

@mark-friedman
Copy link
Collaborator Author

Thank you so much, @BeksOmega! I'll check it out asap.

@BeksOmega BeksOmega removed their assignment Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request lexical variables Use this tag for the lexical variable plugin
Projects
None yet
Development

No branches or pull requests

2 participants