racket / racket/gui

`'root` menu bar has some problems

Open
#335 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
68
Forks
82
PR merge metrics
No merged PRs in 30d

Description

There seem to be two problems (or two symptoms of the same problem).

  1. run this first program and then close the window. The type cmd-o. This should produce the printout "open", but it beeps instead.
#lang racket/gui
(define mb (new menu-bar% [parent 'root]))
(define m (new menu% [label "File"] [parent mb]))
(define mi (new menu-item% [parent m] [label "Open"] [shortcut #\o] [callback (λ x (printf "open\n"))]))
(define f (new frame% [label "frame"] [width 100] [height 100]))
(send f show #t)
(yield (make-semaphore 0))
  1. this second program should show the root menu bar, but when running racket f.rkt (where f.rkt contains this program) from the command line doesn't do that. It just seems to keep the previous menu bar from whatever app you used to run racket.
#lang racket/gui
(define mb (new menu-bar% [parent 'root]))
(define m (new menu% [label "File"] [parent mb]))
(define mi (new menu-item% [parent m] [label "Open"] [shortcut #\o] [callback (λ x (printf "open\n"))]))
(yield (make-semaphore 0))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the two minimal racket/gui programs from the issue and reproduce both root menu-bar failures, including the command-line case. Trace the root menu-bar behavior from the GUI entry points involved; done means cmd-o prints "open" after closing the window and running the second program displays its own root menu bar.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.