[mcclim-devel] Command translator question

Timothy Moore moore at bricoworks.com
Sat Apr 30 15:30:41 UTC 2005


Does this work if you give the translator a high priority, like 100? 
There might be some weirdness with the default translator in the global 
command table.

Tim
On Apr 30, 2005, at 10:54 AM, Duncan Rose wrote:

>
> 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
>
> <glimpse.lisp>_______________________________________________
> mcclim-devel mailing list
> mcclim-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel




More information about the mcclim-devel mailing list