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

No way to delete a variable #2

Closed
GoogleCodeExporter opened this issue Dec 6, 2015 · 2 comments
Closed

No way to delete a variable #2

GoogleCodeExporter opened this issue Dec 6, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Once a variable is created, there is currently no way to delete it.

- Need function in Blockly.Variables for programmatic interaction

- Need means of deleting a variable from the gui, possibly via an additional 
item in Blockly.Variables.dropdownCreate().

This requires some thought, though. Should deleting a variable that is used 
elsewhere cause it to disappear globally? Should the deletion be ignored until 
all uses are removed?


Original issue reported on code.google.com by derrell....@gmail.com on 10 May 2012 at 5:23

@GoogleCodeExporter
Copy link
Author

Variables are created based on what blocks currently exist in the workspace.  
If you delete all instances of a variable, then the variable ceases to exist.

Steps to recreate:
Create get variable block.
Rename variable to 'foo'.
Observe that exported JavaScript contains 'var foo;' and the Variables toolbox 
contains 'item' and 'foo'.
Delete the variable block form the workspace.
Observe that the exported JavaScript and the Variables toolbox no longer 
contains 'foo'.

Original comment by neil.fra...@gmail.com on 10 May 2012 at 6:09

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

Ah, that makes sense.

Original comment by derrell....@gmail.com on 10 May 2012 at 6:17

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

No branches or pull requests

1 participant