Closed benknoble closed 2 years ago
I'm unable to reproduce the issue, but your example is incomplete so I've had to change it a bit. This works for me:
#lang racket
(require racket/gui/easy)
(define root
(render
(window
(button
"Pop"
(thunk
(render-popup-menu
root
(popup-menu
(menu-item "Click Me" (thunk (displayln "Hi"))))
0 0))))))
Oh, I missed the mouse-event
parts. Still odd that I get the error, though. Adding those two arguments fixes it.
Could it be a bug with racket/gui
that doesn't handle arity-errors correctly?
Any arity errors should be (and seem to be) caught at the gui/easy level, so I'm not sure what exactly must've gone wrong. I've tried a couple things to get it to fail, like changing root
to a different value, but everything I've tried just ends in a contract error, not a crash.
Every variation on the following program I have tried has failed:
A blur of "invalid memory reference" errors flies by, and not even C-\ can stop them (I have to
kill
the process). This was based partly on the popup in your video in #13.Platform details: