Skip to content

Conversation

paulkaplan
Copy link
Contributor

The variable-utils file was slated to be removed pending adding those methods to scratch-vm. That was done, and now having these separate functions will make it harder to fix issues like the slider monitors not updating global vars.

Better late than never I guess (scratchfoundation/scratch-vm#1145 was merged in may...)

Hooray removing dead code!

@kchadha
Copy link
Contributor

kchadha commented Dec 6, 2018

@paulkaplan, why was this PR closed?

@paulkaplan
Copy link
Contributor Author

@kchadha it was only a minor issue: the getVariableValue util in GUI is handling which sprite to look for the variable on or whether to look at the stage, whereas the code in the VM doesn't do that. It just means the vm wasn't a drop-in replacement, and a bit of extra logic about which target to look up the variable ID needs to be added into the GUI before calling getVariableValue. It also looks like the GUI util was automatically creating a new array reference, so we just need to add that into the list operations code (most look like they already produce new arrays, so might not be an issue).

Mostly I just closed it because it didn't work off-the-bat and we didn't need it until we had scratchfoundation/scratch-vm#1823 anyway, but now that that is in I can pick this back up

@chrisgarrity
Copy link
Contributor

@kchadha I'm reassigning this to you, can you decide if this should just get closed, or be reviewed. Reassign back to me if it should be reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants