ardublockly icon indicating copy to clipboard operation
ardublockly copied to clipboard

Change item/variable name or new not popping up

Open MadTooler opened this issue 9 years ago • 7 comments

When using the current ready to run windows version on Win 7 64, the popup window normally seen in blockly, or the ability to type over the label of the variables (default as "item"), does not appear to function.


Repository owner edit to trigger Github task list for this issue:

  • [x] Refactor Blockly to allow async update of variable names
  • [x] Update desktop aplication to use Ardublockly HTML modal instead of window.prompt (browser version still uses prompt)
  • [ ] Further refactor Blockly to allow async creation of a new variable name
  • [ ] Submit blockly changes as upstream PR

MadTooler avatar Jan 16 '16 05:01 MadTooler

Looks like prompt is not supported on Electron (the framework used to created the desktop application). So it looks like an HTML implementation will have to be created to fix this.

carlosperate avatar Jan 17 '16 19:01 carlosperate

Work around for now is renaming the variable within the "blocks xml" window.

MadTooler avatar Jan 19 '16 02:01 MadTooler

I've got planned a simple workaround to get that working that should not take much time to implement.

carlosperate avatar Jan 19 '16 13:01 carlosperate

Partial fix to this issue, so I'll leave it opened for now. Turned out to be a bit more complex than anticipated, as I was hoping to not have to modify core Blockly.

The functionality is accessible, but to create a new variable with a custom name an additional step is required, first you create a new variable, then rename it. I'll have to further refactor Blockly to combine both steps into 1 again.

https://github.com/carlosperate/ardublockly/commit/544cdb941949185121b82f0f98df0449ddd54f25

carlosperate avatar Jan 22 '16 17:01 carlosperate

Set up milestone for the version after next, as partial workaround is probably adequate for first release. Task list has been added to original issue message to trigger GitHub's task tracker.

carlosperate avatar Jan 22 '16 21:01 carlosperate

Appears to work well. I tried it both on Win 7 64b pro, home, and through your web version on my android. All were successful in renaming.

MadTooler avatar Jan 23 '16 20:01 MadTooler

Thanks for testing, glad the partial solution works well.

carlosperate avatar Jan 24 '16 19:01 carlosperate