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

Force refresh of List origins when accessed via VariablesState to fix bug where some Lists loaded from file don't get initialized. #764

Closed
wants to merge 2 commits into from

Conversation

russellquinn
Copy link
Contributor

@russellquinn russellquinn commented May 13, 2022

This is my (hacky?) fix for the bug I describe here: #763

This PR adds a check when an InkList is accessed via VariablesState to see if its origins is null. If it is, then it tries to populate them at that point. The rest of the changes are some code refactoring to keep the origin-setting code in one place.

This has fixed my specific problem, but it's almost certainly not a comprehensive fix. Hopefully it's a useful start though.

The real fix should probably make sure all InkList origins are populated after a LoadJson(). I don't understand the entire runtime enough to do that.

… bug where some Lists loaded from file don't get initialized.
shinyu6 added a commit to shinyu6/ink that referenced this pull request May 7, 2023
@joethephish joethephish closed this Jun 5, 2024
@joethephish
Copy link
Member

As described in issue, this is an issue but I'd rather not accept this specific fix.

@russellquinn
Copy link
Contributor Author

Yeah, I agree. I figured you'd be able to fix it in a more comprehensive way!

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