CLIM mail archive
[Prev][Next][Index][Thread]
problem with keystroke accelerators
CLIM 28.5 (1.1) and Genera 8.1.1
I want to be able to zoom a graphic by typing h-z for example. The
zoomed graphic needs to be centered on the pointer position.
So I tried the following code, but it doesn't work when I press h-z (I
tried other keys too, h- and c- ones) but it works when I type the
command in full... (command: Zoom In On Pointer)
Why does it beep when I press h-z?
(define-nanesse-network-configuration-command
(com-zoom-in-on-pointer :name t :keystroke #\h-z) ()
(clos:with-slots (echelle-x
echelle-y)
(nanesse-frame)
(multiple-value-bind (x y)
(clim:stream-pointer-position* (nanesse-network-display))
(format (frame-query-io (nanesse-frame))
"~&pointer x = ~a; pointer y = ~a" x y)
(setf echelle-x
(* echelle-x 1.5))
(setf echelle-y
(* echelle-y 1.5))
(clim:window-clear *standard-output*)
;;(set-display-center x y)
(draw-network-map (nanesse-frame) (nanesse-network-display)))))
Following remarks on page 297, I tried adding the following (although I
don't need default values because my command doesn't have any arguments
at all), but it doesn't change anything:
(clim:add-keystroke-to-command-table
'nanesse-network-configuration
#\hyper-z :command '(com-zoom-in-on-pointer))
As an aside problem, when I try with :keystroke #\c-t, I get an error:
Trap: The second argument to the EQUAL-NUMBER-NO-POP instruction, NIL, was not a number
The following specials have been rebound; use :Show Standard Value Warnings for details:
*PACKAGE*
While in the function CLIM::FORWARD-OR-BACKWARD CLIM::COM-IE-TRANSPOSE-CHARACTERS (:PROP
ERTY SYS:DTP-SYMBOL SI:INTERPRETER-FUNCTION)
CLIM::FORWARD-OR-BACKWARD
Arg 0 (CLIM::INPUT-BUFFER): #<ARRAY 100 fill-pointer 0 2202515655>
Arg 1 (CLIM::START-POSITION): NIL
Arg 2 (CLIM::REVERSE-P): T
Arg 3 (CLIM::PREDICATE): #<Compiled function CLIM::TRUE 22041355573>
s-A, : Supply replacement argument
s-B: Supply replacement argument, storing back into POSITION
s-C: Return 2 values from the EQUAL-NUMBER-NO-POP instruction
s-D: Retry the EQUAL-NUMBER-NO-POP instruction
s-E, : Return to Nanesse Network Configuration command level
s-F: Nanesse Network Configuration top level
s-G: Exit Nanesse Network Configuration
s-H: Exit process Nanesse Network Configuration
Can someone help?
Thanks
vk
--
Never trust a pretty header: use keunen@nrb.be to reply
--
Keunen Vincent Network Research Belgium
R&D, Software Engineer Parc Industriel des Hauts-Sarts
keunen@nrb.be 2e Avenue, 65
tel: +32 41 407282 B-4040 Herstal
fax: +32 41 481170 Belgium
0,,
Follow-Ups:
Main Index |
Thread Index