question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

real time code generation incorrect while dragging?

See original GitHub issue

Problem statement

It can reproduce with the online demo at: https://developers.google.com/blockly/ While dragging a block from toolbox, the real time generation of code is incorrect.

Expected Behavior

N/A

Actual Behavior

屏幕快照 2019-07-16 下午6 52 53

Steps to Reproduce

  1. open ‘https://developers.google.com/blockly/
  2. use the “Try Blockly”
  3. switch “Language” to “Python” (also fail with other language in fact…).
  4. drag “if do” block in “logic”
  5. while dragging, the generated code is as below:
if False:
  pass

if False:
 pass

which is incorrect and confusing to user. 6. stop dragging and put the block in workspace, the generated code is as below:

if False:
  pass

which is correct.

Stack Traces

N/A

Operating System and Browser

Mac OSX, Chrome

Additional Information

N/A

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JoshuaLowe1002commented, Apr 30, 2020

What’s the best way to implement a quick fix for those using compressed blockly?

1reaction
rachel-fenichelcommented, Apr 30, 2020

@BeksOmega good observation. I think that should work, though I will need to see tests to be certain.

Another option is to return the empty string from workspace to code if mid-drag, but I can’t imagine that being good for existing uses. (Admittedly, neither is generating bad code, so maybe it’s an acceptable solution if you can’t get yours to work.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual studio shows endless messages "Code generation for ...
When the errors appear again, I will study that code. This leaves the problem why the error message appears in infinite numbers instead...
Read more >
Potential Bug Fixes in R2023a Prerelease - MATLAB & Simulink
Product Record Bug Summary Deep Learning Toolbox 2803451 Image generation experiment template errors MATLAB 2736745 Security Issue: who ‑file might execute code MATLAB 2739217 tab completion...
Read more >
Drag'n'Drop with mouse events - The Modern JavaScript Tutorial
The problem is that, while we're dragging, the draggable element is always above other elements. And mouse events only happen on the top ......
Read more >
10.11. Drag and Drop Problem - Open EdX Documentation
When learners view a drag and drop problem in the LMS, the problem includes a ... Each time a learner drops an item...
Read more >
Drag and drop - Android Developers
Although every view in the layout has an onDragEvent() callback, the default implementation returns false . Your application notifies the system ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found