No callback when re-selecting in choice%
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 領域
- desktop
調査の方向性
choice% の実装とリンクされている choice% のドキュメントから始め、提供されている #lang racket/gui の例を使って Linux でのコールバック動作を再現します。ドキュメントに記載されたコールバックの基準と観測された動作を比較し、関連するプラットフォームのケース全体で結果を検証します。動作またはドキュメントの整合性が取られ、テストされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When using Racket 8.0 under Kubuntu 20.04 (Qt version 5.12.8, KDE Frameworks version 5.68.0), the callback function in choice% is not called when clicking on the already selected item, but only when clicking on a different item. I was not able to test on a different system, but as explained in this reddit post @sorawee tried the code on both Linux and Mac OS and was only able to reproduce the bug on the former.
This example reproduces the behavior:
#lang racket/gui
(define main-window (new frame% [label "Callback test"] [width 400] [height 400] [border 10]))
(new choice%
[label "Choice"]
[parent main-window]
[choices (list "Option A" "Option B" "Option C")]
[callback
(lambda (c e) (new message% [parent callback-log]
[label (string-append (symbol->string (send e get-event-type))
" event @"
(number->string (send e get-time-stamp)))]))])
(define callback-log
(new group-box-panel% [parent main-window]
[label "List of callback events:"]
[min-height 200]))
(send main-window show #t)
It might be interesting to consider rewording the documentation for choice%, since two slightly different criteria are given for when the callback is invoked. It first says (emphasis mine):
Whenever the selection of a choice item is changed by the user, the choice item’s callback procedure is invoked.
which implies that the newly selected item needs to be different from the previously selected one, yet a bit later it says:
The callback procedure is called (with the event type 'choice) when the user selects a choice item (or re-selects the currently selected item).
- 主要言語
- Racket
- スター
- 68
- フォーク
- 83
- 平均マージ
- 12日 5時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
racket/gui のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
Colorer messes up when given a lexer that supplies nonzero backups対応中かも @otherjoel が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
IridiumIO/CompactGUI#699 ·
メンテナーはふだん 3 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AvengeMedia/DankMaterialShell#3853 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
SUPERCILEX/gnome-clipboard-history#231 · コメント 1 件 ·