Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Mouse-dragging idiom does not work

オープン
#151 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
coffeescript, javascript
領域
compilers

調査の方向性

while [mouse-down?] [] 用に生成された JavaScript と、StopInterrupts 周辺の制御フロー処理から始めます。提供されたモデルを再現し、その動作を JVM NetLogo と比較してから、Mouse Drag One Example を確認します。ループ中にマウスの状態が更新され、両方のケースが期待されるメッセージまたはドラッグ動作に到達すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

Create a model with a go (forever) button, and give it this code:

to go
  if (mouse-down?) [
    while [mouse-down?] []
    show "No more Mr. Mouse"
  ]
end

Click on the View. In JVM NetLogo, you will see the message "No more Mr. Mouse". In Tortoise, the code for that line will never be reached. The mouse is never given a chance to update whether it's down or not, since the JS for while [mouse-down] [] is a while loop that dominates control of the system.

This could maybe be fixed by actually having while compile to recursive(esque) setTimeout calls. It's kind of gross, but... it would maybe get us better NetLogo semantics. I'm not sure if that would work out well with how we're currently throwing StopInterrupts, though. The whole things a big mess of wonky control flow that doesn't translate well into JavaScript.

This problem also prevents Mouse Drag One Example from working correctly (since it, too, goes into an endless while loop).

Discovered while investigating #150.

主要言語
CoffeeScript
スター
57
フォーク
28
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NetLogo/Tortoise のほかの issue

NetLogo/Tortoise の issue をすべて見る

似ている issue

Compilers の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。