[mcclim-devel] fix for remove-command-from-command-table

Vincent Arkesteijn vincent at arkesteijn.net
Thu Mar 23 13:25:22 UTC 2006


On Thu, Mar 23, 2006 at 10:14:10AM +0000, Christophe Rhodes wrote:
> Could I have a test case for Tests/commands.lisp?

I've had a brief look at the two tests already present in
Tests/commands.lisp, and I think there's something wrong.

According to 27.1, "Every command is named by command name, which is
a symbol.". However, the two tests in that file give a list as the
command-name argument to add-command-to-command-table. 

After changing that (see attachment) I get an error:

Condition COMMAND-NOT-PRESENT was signalled.
   [Condition of type COMMAND-NOT-PRESENT]

Restarts:
  0: [ABORT-REQUEST] Abort handling SLIME request.
  1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "worker" {100482DD71}>)

Backtrace:
  0: (CLIM-INTERNALS::PARTIAL-COMMAND-FROM-NAME COM-TEST-COMMAND)
  1: (LOOKUP-KEYSTROKE-COMMAND-ITEM (:KEYBOARD #\t 0) NO-MENU-TEST-TABLE :TEST NIL :NUMERIC-ARG 1)
  2: ((LAMBDA (MENU-NAME GESTURE ITEM)) NIL (:KEYBOARD #\t 0) #<MENU-ITEM keystroke (t) {1004948BC1}>)
  3: (MAP-OVER-COMMAND-TABLE-KEYSTROKES #<CLOSURE (LAMBDA (MENU-NAME GESTURE ITEM)) {1002377FD9}> NO-MENU-TEST-TABLE)
...

Vincent.
-------------- next part --------------
? remove-command-from-command-table-test.diff
? remove-command-from-command-table-test.diff2
Index: commands.lisp
===================================================================
RCS file: /project/mcclim/cvsroot/mcclim/Tests/commands.lisp,v
retrieving revision 1.2
diff -u -F^(def -r1.2 commands.lisp
--- commands.lisp	30 Sep 2005 16:02:33 -0000	1.2
+++ commands.lisp	23 Mar 2006 13:09:04 -0000
@@ -8,7 +8,7 @@ (defpackage :clim-tests
 ;;; command tables
 (define-command-table no-menu-test-table)
 
-(add-command-to-command-table '(com-test-command) 'no-menu-test-table
+(add-command-to-command-table 'com-test-command 'no-menu-test-table
                               :keystroke '(#\t))
 
 (let ((count 0))
@@ -26,7 +26,7 @@ (define-command-table no-menu-test-table
 
 (define-command-table menu-test-table)
 
-(add-command-to-command-table '(com-test-command) 'menu-test-table
+(add-command-to-command-table 'com-test-command 'menu-test-table
                               :keystroke '(#\u)
                               :menu "Test")
 


More information about the mcclim-devel mailing list