I'm having trouble with overriding one of framework's methods to add a menu
item. Here's what I'm currently doing:
#lang racket/gui
(require framework)
(define ext-frame%
(frame:standard-menus-mixin
(frame:status-line-mixin frame:basic%)))
(define shc-frame%
(class ext-frame%
(super-new)
(define/override (edit-menu:create-clear?) #f)
(define/override (edit-menu:between-select-all-and-find)
(new menu-item%
[parent (list-ref (send (send this get-menu-bar) get-items) 1)]
[label "Patch"]
[callback (lambda (menu event)
(send this show #t))])))) ; The callback is just a
placeholder for now.
(define test-frame (new shc-frame%
[label "TEST!"]
[height 200]
[width 200]))
When I run the program I get the following error:
edit-menu:between-select-all-and-find method in shc-frame%: arity mismatch;
the expected number of arguments does not match the given number
expected: 0
given: 1
arguments...:
(object:...ork/private/menu.rkt:33:4 ...)
Sorry if I'm missing something basic. I'm fairly new to programming.
Thanks so much.
-Bruce
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.