define-presentation-to-command-translator
Daniel Kochmański
daniel at turtleware.eu
Thu May 13 15:42:28 UTC 2021
Hey Paul,
thank you for the report! After looking into this I've concluded that your example is incorrect.
>From http://bauhh.dyndns.org:8000/clim-spec/23-7.html#_1233 (define-presentation-to-command-translator specification):
> The other arguments to define-presentation-to-command-translator are the same as for define-presentation-translator.
[applies also to to arglist]
Then http://bauhh.dyndns.org:8000/clim-spec/23-7.html#_1230 (define-presentation-translator specification)
> arglist, tester-arglist, and doc-arglist are each an argument list that must "match" the following "canonical" argument list.
> (object &key presentation context-type frame event window x y)
> In order to "match" the canonical argument list, there must be a single positional argument that corresponds to the presentation's object, and several named arguments that must match the canonical names above (using string-equal to do the comparison)
In your example you have:
(define-presentation-to-command-translator xlate-set-rcursor
(clim:blank-area com-set-cursor foo)
(x y window)
(%set-a-cursor *standard-output* x y window))
So the arglist is (x y window). X is matched as the positional required argument OBJECT, then Y and WINDOW are matched by name
(as if we had transformed this arglist to (object &key y window). Perhaps LW CLIM doesn't uphold this requirement and matches
all arguments by name?
Best regards,
Daniel
--
Daniel Kochmański ;; aka jackdaniel | Przemyśl, Poland
TurtleWare - Daniel Kochmański | www.turtleware.eu
"Be the change that you wish to see in the world." - Mahatma Gandhi
More information about the mcclim-devel
mailing list