x-coord not supplied in blank-area-click

Nisar Ahmad nisarahmad1324 at gmail.com
Fri Aug 3 15:57:36 UTC 2018


Hello Orm,

The arglist part of the command-translator cannot be arbitrary. It is 
defined at (look above the Annotation box):

http://bauhh.dyndns.org:8000/clim-spec/edit/anno?aid=C08E110497C3F03AEACC5765A4C86416%2Fdefine-presentation-translator%2F23.7.1#Z

with that in mind, replacing your translator from:

(define-presentation-to-command-translator blank-area-click
      (blank-area com-blank-area-click clim-quo
                  :gesture :select
                  :echo nil)
      (x y)
    (list x y))

to

(define-presentation-to-command-translator blank-area-click
      (blank-area com-blank-area-click clim-quo
                  :gesture :select
                  :echo nil)
      (object x y)
    (list x y))

should work. Hope it helps.

On 08/02/2018 06:37 PM, Orm Finnendahl wrote:
> Hi,
>
>   the x coordinate is nil when handling blank-area-clicks. This is how
> the chain is defined:
>
> (define-presentation-to-command-translator blank-area-click
>       (blank-area com-blank-area-click clim-quo
>                   :gesture :select
>                   :echo nil)
>       (x y)
>     (list x y))
>
> (define-clim-quo-command (com-blank-area-click :name nil) ((x 'real) (y 'real))
>    (handle-blank-area-click (find-pane-named *application-frame* 'canvas) x y))
>
> (defun handle-blank-area-click (pane first-point-x first-point-y)
>    (break "blank-area-click x: ~a, y: ~a~%" first-point-x first-point-y)
> ;;; (details omitted...)
> )
>
> When clicking in a blank area of the pane handle-blank-area-click
> breaks with:
>
> blank-area-click x: nil, y: 140
>
> The y coordinate is correct. I'm pretty sure it used to work, but the
> code is some years old and I'm unsure whether the api might have
> changed, but couldn't find anything.
>
> This happens with most recent quicklisp mcclim-20180711-git on arch
> linux running sbcl 1.4.8 under X11.
>
> Let me know if you need more details.
>
> Any help is appreciated! I might be able to work around it by
> determining the mouse position within the handler code, but this seems
> wrong to me...
>
> --
> Orm
> ----------------------------------------------------------------------
> Prof. Orm Finnendahl
> Komposition
> Hochschule für Musik und Darstellende Kunst
> Eschersheimer Landstr. 29-39
> 60322 Frankfurt am Main
>




More information about the mcclim-devel mailing list