[mcclim-devel] Command translator question

Duncan Rose duncan at robotcat.demon.co.uk
Sat Apr 30 08:54:06 UTC 2005


I'm trying to define a presentation command translator which will 
invoke 'describe presentation' on specific types. Unfortunately it 
doesn't work (or at least, works in a way that I'm not expecting so if 
it's working it's not doing what I want ;-)

Looking at the translators defined in the Listener and in 
builtin-commands.lisp hasn't helped. Here's the translator:

(define-presentation-to-command-translator port-select-to-command  ; 
name
   (t                     ; from-type
    com-describe          ; command-name - maybe 
com-describe-presentation?
    global-command-table  ; command table containing command
    :gesture :select      ; activate on :select (left-button click)
    ;; :tester ...
    :documentation
    "Invoke the 'describe presentation' command on the selected 
presentation"
    :pointer-documentation ((object stream) (format stream "Describe ~A" 
object))
    :menu t               ; command should appear in popped-up menus
    ;; :priority ...
    :echo nil)            ; don't echo the command when it is invoked
   ;; arglist must be a subset (using string-equal) of:
   ;;    (object presentation context-type frame event window x y)
   (object)
   ;; body of translator; returns a list of the arguments to the command
   ;; named by command-name.
   (list object))

In case I was providing the wrong 'from-type' I changed it to T (all 
types, I hope). I've written this using the Beagle back end but it 
doesn't work for me when run under CLX either...

Any suggestions would be appreciated, I'm obviously missing something...

I've attached the complete code for context in case it's helpful.

-Duncan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: glimpse.lisp
Type: application/octet-stream
Size: 11211 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/mcclim-devel/attachments/20050430/6d41a702/attachment.obj>


More information about the mcclim-devel mailing list