I've been messing around with GUI programming and I came across 
current-text-keymap-initializer which, according to the documentation, may 
accept a procedure that itself takes a single parameter (a keymap%).

Now, I've tried to invoke this via
`(current-text-keymap-initializer (lambda (keymap) (void)))`
but then I get this error:

`../../usr/share/racket/collects/racket/private/class-internal.rkt:3415:0: 
init-editor-keymap: arity mismatch;
 the expected number of arguments does not match the given number
  expected: 0
  given: 1
  arguments.:`

Okay, so I guess the procedure actually doesn't need a parameter.

`(current-text-keymap-initializer (λ () (void)))` also gives an error!

`../../usr/share/racket/pkgs/gui-lib/mred/private/editor.rkt:558:2: 
default-text-keymap-initializer: contract violation
  expected: (procedure-arity-includes/c 1)
  given: #<procedure>`

Now it's breaking contract because it expected a procedure that has a single 
parameter!

Is this a bug in the code or is this a bug in the documentation? Or both!

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to