Skip to content

'root menu bar has some problems #335

@rfindler

Description

@rfindler

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions