microsoft / pxt-brainpad

Microsoft MakeCode editor for the GHI Brainpad
https://makecode.brainpad.com/
Other
3 stars 11 forks source link

lightbulb.setColor() function is different between Blocks and JavaScript. #63

Closed greg-norris closed 6 years ago

greg-norris commented 6 years ago

When dragging the "set light bulb to" block into the staging area, it works fine when switching between Blocks and Javascript. After dragging "setColor()" on the JavaScript side, I get an error when trying to switch back into the Block editor.

The block code side creates this function when switching to Javascript lightbulb.setColor(0xFF0000)

The Javascript side creates this function when dragging in. lightbulb.setColor(Colors.Red)

Neither of these functions seem to work correctly when trying to use them inline in Markdown examples.

pelikhan commented 6 years ago

Fixed in https://github.com/Microsoft/pxt-brainpad/commit/b5cadcb960cdcbe2552aa4de84d5ff4693196106