Skip to content

Commit

Permalink
fix check for the presence of the stepper button
Browse files Browse the repository at this point in the history
checking `is-shown?` checks the wrong there here, in the guards

this bug is similar to the one fixed in racket/drracket@0578440
  • Loading branch information
rfindler committed Sep 14, 2024
1 parent 0d185fd commit 87820a2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions htdp-lib/stepper/stepper-tool.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,15 @@
(register-toolbar-button stepper-button #:number 59)

(define (stepper-button-show)
(unless (send stepper-button is-shown?)
(send (send stepper-button get-parent)
(define parent (send stepper-button get-parent))
(unless (member stepper-button (send parent get-children))
(send parent
add-child stepper-button)))

(define (stepper-button-hide)
(when (send stepper-button is-shown?)
(send (send stepper-button get-parent)
(define parent (send stepper-button get-parent))
(when (member stepper-button (send parent get-children))
(send parent
delete-child stepper-button)))

;; when the window closes, notify all of the stepper frames.
Expand Down

0 comments on commit 87820a2

Please sign in to comment.