Prompting A User For a Canvas Click

cage cage-dev at twistfold.it
Tue Dec 8 19:38:36 UTC 2020


On Mon, Dec 07, 2020 at 11:27:19AM -0700, Ryan Burnside wrote:

> Hello All,

Hi!


> Suppose a user loaded a command like so:
> (defun draw-foo (&key (pt1 nil) (pt2 nil))
>    (unless (or pt1 pt2)
>      (setf pt1 (prompt-canvas "Define point 1 of FOO."))
>      (setf pt2 (prompt-canvas "Define point 2 of FOO.")))
>    (user-defined-drawing-nonsense pt1 pt2))

I think i can see the point  (no pun intended), but i wonder if events
are the  proper way  to get  user input, then  draw with  the provided
data/functions/shapes.

Bye!
C.



More information about the ltk-user mailing list