Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'root menu bar has some problems #335

Open
rfindler opened this issue Aug 28, 2024 · 0 comments
Open

'root menu bar has some problems #335

rfindler opened this issue Aug 28, 2024 · 0 comments

Comments

@rfindler
Copy link
Member

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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant