default   Racket Bugs
Main PageQuick QueryStandard QueryAdvanced QueryHelp
Log in

View Problem Report: 12737

send email to interested parties or send email followup to audit-trail
Reporter's email: laurent dot orseau at gmail dot com
Number: 12737
Category: all
Synopsis: Show active keybindings does not like 'f1 menu item shortcuts
Class: sw-bug
Responsible: robby
Notify-List:
Severity: serious
Priority: medium
State: closed
Confidential: no
Arrival-Date: Sat Apr 28 05:20:01 -0400 2012
Closed-Date: Sat Apr 28 09:52:33 -0400 2012
Last-Modified: Sat Apr 28 09:52:33 -0400 2012
Originator: Laurent Orseau
Organization: plt
Submitter-Id: unknown
Release: 5.3.0.2--2012-04-20(32a2339/a)
Environment: unix "Linux HP-2730p 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 i686 i686 i386 GNU/Linux" (i386-linux/3m) (get-display-depth) = 32
Human Language: french
(current-memory-use) 223046476
Links: (links) = (); (links #:user? #f) = (); (links #:root? #t) = (); (links #:user? #f #:root? #t) = ()


Collections:
("/home/orseau/.racket/5.3.0.2/collects"
(non-existent-path))
("/usr/lib/racket-full-5.3.0.2/collects"
("info-domain" "srfi" "redex" "web-server" "rnrs" "test-engine" "racket" "tex2page" "handin-client" "sirmail" "honu" "trace" "schemeunit" "help" "typed" "eopl" "json" "texpict" "htdp" "test-box-recovery" "profile" "readline" "embedded-gui" "frtime" "db" "gui-debugger" "plai" "unstable" "mred" "scheme" "wxme" "make" "typed-scheme" "file" "framework" "data" "syntax-color" "planet" "scribblings" "xml" "racklog" "hierlist" "string-constants" "tests" "drscheme" "graphics" "icons" "parser-tools" "rackunit" "at-exp" "xrepl" "slideshow" "sgl" "lazy" "datalog" "plot" "mzscheme" "raco" "mrlib" "images" "r5rs" "defaults" "slatex" "teachpack" "picturing-programs" "meta" "ffi" "launcher" "config" "mzcom" "errortrace" "combinator-parser" "reader" "html" "dynext" "r6rs" "setup" "handin-server" "openssl" "s-exp" "syntax" "stepper" "2htdp" "swindle" "browser" "scribble" "typed-racket" "games" "version" "net" "compiler" "drracket" "macro-debugger" "scriblib" "mysterx" "algol60" "repo-time-st!
amp" "lang" "deinprogramm" "mzlib" "preprocessor"))

Computer Language: (("Déterminer le langage à partir du code source") (#(#t print mixed-fraction-e #f #t debug) (default) #() "#lang racket\n" #t #t ((main) (test))))
Description: Hi,

When adding a menu item to DrRacket with a shortcut that is not a character, clicking on Edit, Show active keybindings raises an error:
string: expects argument of type <character>; given: f3

Possible fix:

In collects/drracket/private/frame.rkt,
around line 58,
replace:
(string-append
(menu-item->prefix-string item)
(case short-cut
   [(#\;) "semicolon"]
   [(#\:) "colon"]
   [(#\space) "space"]
   [else (string short-cut)]))
by:
(string-append
(menu-item->prefix-string item)
(if (symbol? short-cut)
     (symbol->string short-cut)
     (case short-cut
       [(#\;) "semicolon"]
       [(#\:) "colon"]
       [(#\space) "space"]
       [else (string short-cut)])))


Laurent

--------------

Error trace:

string: expects argument of type <character>; given: f3

=== context ===
/usr/lib/racket-full-5.3.0.2/collects/drracket/private/frame.rkt:53:13
/usr/lib/racket-full-5.3.0.2/collects/drracket/private/frame.rkt:51:10: loop
/usr/lib/racket-full-5.3.0.2/collects/drracket/private/../../racket/private/map.rkt:53:19: loop
/usr/lib/racket-full-5.3.0.2/collects/drracket/private/../../racket/private/map.rkt:53:19: loop
/usr/lib/racket-full-5.3.0.2/collects/drracket/private/frame.rkt:49:6: get-menu-bindings method in ...et/private/frame.rkt:27:4
/usr/lib/racket-full-5.3.0.2/collects/drracket/private/frame.rkt:143:6: show-keybindings method in ...et/private/frame.rkt:27:4
/usr/lib/racket-full-5.3.0.2/collects/mred/private/mrmenu.rkt:246:17: command method in basic-selectable-menu-item%
/usr/lib/racket-full-5.3.0.2/collects/racket/private/more-scheme.rkt:151:2: call-with-break-parameterization
/usr/lib/racket-full-5.3.0.2/collects/racket/private/more-scheme.rkt:268:2: call-with-exception-handler
/usr/lib/racket-full-5.3.0.2/collects/mred/private/wx/common/queue.rkt:445:6
/usr/lib/racket-full-5.3.0.2/collects/mred/private/wx/common/queue.rkt:485:32
/usr/lib/racket-full-5.3.0.2/collects/mred/private/wx/common/queue.rkt:633:3
File Attachments:
How-To-Repeat:
Fix:
Release-Note:
Unformatted:

send email to interested parties or send email followup to audit-trail

Audit Trail:

Responsible changed from "nobody" to "robby" by robby at racket-lang.org at Sat, 28 Apr 2012 09:52:33 -0400
Reason>>> A commit by robby at racket-lang.org has resolved this report
  http://git.racket-lang.org/plt/commit/98e06248b5
State changed from "open" to "closed" by robby at racket-lang.org at Sat, 28 Apr 2012 09:52:33 -0400
Reason>>> A commit by robby at racket-lang.org has resolved this report
  http://git.racket-lang.org/plt/commit/98e06248b5