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

Cannot invoke Do it on an object inspector with an expression containing undefined variables #221

Open
npapagna opened this issue Jan 3, 2022 · 2 comments

Comments

@npapagna
Copy link
Contributor

npapagna commented Jan 3, 2022

Describe the bug
Invoking Do it in an object inspector with a selection containing undefined variables fails.

To Reproduce

Follow these steps for all scenarios:

  1. Inspect Object new.
  2. In the object inspector, evaluate a _ self. a printString..
  3. The Unknown variable dialog shows up.

1) Block-Local/Method-Local temporary scenario

  1. Select block-local temp/method-local temp
  2. Notice that Do it failed, and the source code got messed up:
a Nothing more expected ->_ se| a |
lf. a printString.

2) Instance variable scenario

  1. Select instance
  2. Notice that the debugger is opened because of Error: a is already defined in a subclass of Object
  3. Change the script so that the undefined variable has an unused name (e.g. aaa _ self. aaa printString.)
  4. Notice that the system actually tried to define that instance variable, but it did not because in this case, Object cannot be changed.

Expected behavior
I was expecting the evaluation panel in the debugger to behave more like a workspace than a debugger (e.g. to avoid defining instance variables if I am doing experiments with a script).

Screenshots

Block-Local/Method-Local temporary scenario:

Screen.Recording.2022-01-03.at.17.25.33.mp4

Instance variable scenario:

Screen.Recording.2022-01-03.at.17.26.10.mp4

Additional context
N/A

@npapagna npapagna changed the title Cannot invoke Do in on an object inspector with an expression containing undefined variables Cannot invoke Do it on an object inspector with an expression containing undefined variables Jan 3, 2022
@nmingotti
Copy link
Contributor

please, always post your question [email protected] . It has more chances to be seen and answered !

@npapagna
Copy link
Contributor Author

npapagna commented Jan 3, 2022

please, always post your question [email protected] . It has more chances to be seen and answered !

Yup! I was writing the email as this comment came in. Thanks for the reminder @nmingotti 🎉

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

No branches or pull requests

2 participants