CLIM mail archive

[Prev][Next][Index][Thread]

further accelerator problems



    Date: Mon, 16 Dec 1991 08:56 EST
    From:     Rainer Koenig <rkoenig@gate.fzi.de>


    Some days ago I asked the following question:

    >    I want to use the keystroke accelerator option of
    >    define-application-command.
    >
    >    Therefore I do the following:
    >
    >    (define-application-command (com-my-command :menu "My Command"
    >						:name "My Command"
    >						:keystroke #\c-d)
    >       ()
    >       (my-body))
    >
    >    When I now use CTRL-d in my application it beeps, but the body is not evaluated
    >

    (Thanks for answering it)

    I tried two piece of code

    (defmethod read-frame-command ((frame proroad) &key (stream *query-io*))
      (read-command (frame-command-table frame) :stream stream :use-keystrokes t))

    and

    (defmethod read-frame-command ((frame proroad) &key)
      (let ((command-table (find-command-table 'proroad)))
	(with-command-table-keystrokes (keystrokes command-table)
	  (read-command-using-keystrokes command-table keystrokes))))

    the result of both is that the command-table has the correct slot CLIM::KEYSTROKES

    (describe (find-command-table 'proroad))

I have several applications that work correctly with accelerators,
exactly as described, so I know that it must work in general.  What we
have to do is find out why it does not work for you.  Set a BREAKON on
CLIM:BEEP and get a backtrace.

    #<CLIM:COMMAND-TABLE PROROAD 2052467012> is an object of class #<CLOS:STANDARD-CLASS CLIM:COMMAND-TABLE 22006300621>
      CLIM::NAME:  PI:PROROAD
      CLIM::INHERIT-FROM:  (CLIM:GLOBAL-COMMAND-TABLE)
      CLIM::COMMANDS:  #<Table :TEST EQL 16/25 2052467026>
      CLIM::COMMAND-LINE-NAMES:  #(...
				    ("Toggle Density" PI::COM-TOGGLE-DENSITY) ("Toggle Sensors" PI::COM-TOGGLE-SENSORS)
				   ...)
      CLIM::COMPLETION-ALIST:  NIL
      CLIM::COMPLETION-ALIST-TICK:  0
      CLIM::MENU:  #(...
		     ("Toggle Density" #\c-Q (:COMMAND (PI::COM-TOGGLE-DENSITY)))
		     (NIL #\c-W (:COMMAND (PI::COM-TOGGLE-DENSITY)))
		     ...)
      CLIM::MENU-TICK:  8
      CLIM::KEYSTROKES:  (#\c-W #\c-Q)
      CLIM::TRANSLATORS:  
    #(#<CLIM::PRESENTATION-TO-COMMAND-TRANSLATOR PI::ADD-MENU-HERE (CLIM:BLANK-AREA -> (CLIM:COMMAND :COMMAND-TABLE PI:PROROAD)) 2053126262>
    ....
    )
      CLIM::TRANSLATORS-CACHE:  #<Table :TEST EQUAL 2/43 150260050>
    #<CLIM:COMMAND-TABLE PROROAD 2052467012>

    But when I use the accelerators in my application it only beeps

   
	   Rainer

    --
    Rainer Koenig                                   email: rkoenig@fzi.de
    Forschungszentrum Informatik                           king@fzi.de
    Abtl. Technische Expertensysteme und Robotik
    Haid-und-Neu-Strasse 10-14                      Fax : +49-721-9654-309
    D - 7500 Karlsruhe 1                            Tel.: +49-721-9654-313



0,,


Main Index | Thread Index