bbcmicrobit / bbcmicrobit/PythonEditor

blocks: no warnings when connecting 'incompatible' blocks

未关闭
#40 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
201
派生
126
PR 合并指标
30 天内没有已合并 PR

描述

(This one probably isn't trivial, as I think it's partially a blockly/Python limitation)

One of the things that blocks is quite good at is avoid syntax errors.

However, our current implementation doesn't protect the user from type error as well as it could.

For example, the following code fails as soon as it is run on the micro:bit
![image](https://cloud.githubusercontent.com/assets/147113/23947894/8abfaf0a-0978-11e7-844b-abc617bc3b8b.png)

PXT gives slightly more useful feedback:
![blocks types](https://cloud.githubusercontent.com/assets/147113/23947948/c7bb7ba0-0978-11e7-9f30-014e40112a2d.gif)

Do we have a way of giving more immediate feedback to users about type mismatches? Or even better, perhaps (although it's spooky action at a distance) automatically inserting the required conversion so it 'just works'?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。