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

🪲 Add support for empty strings to convert_numerals prefix function #5352

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

boryanagoncharenko
Copy link
Collaborator

Fixes #5341
The prefix function convert_numerals now has support for empty strings and None values.

How to test
Run Hedy locally and navigate to level 12 and run:

for i in range 1 to 3
    form = ask "What form?"
    color = ask "What color?"
    if form is 'test'
        print 'test'

Once the program is running do the following:

  1. Supply any value to the first input, e.g. a
  2. Supply any color to the second input, e.g. red
  3. Cancel the program by clicking the 'Stop program' red button
  4. Start the program again
  5. Supply any value to the first input, e.g. b
  6. Supply any color to the second input, e.g. red
  7. Check that there is no 'string index out of range' error

Copy link
Member

@jpelay jpelay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works!!! It also complements nicely with the fix we did in #5225 (which is te reason why stoppped programs keep reappearing) Ultimately, I want to solve the problem for good, with stopped programs being actually stop, but I'm not sure how to tackle that with the current Skulpt implementation, I would love your help on that!

Copy link
Contributor

mergify bot commented Apr 2, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

Copy link
Contributor

mergify bot commented Apr 3, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 3ead5ea into main Apr 3, 2024
12 checks passed
@mergify mergify bot deleted the error_5341 branch April 3, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🪲 code in french generating an error 'string index out of range'
2 participants