Deutsch   English   Français   Italiano  
<m3v814zlga.fsf@leonis4.robolove.meer.net>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Madhu <enometh@meer.net>
Newsgroups: comp.lang.lisp
Subject: Re: A drawing program on the REPL with GUI feedback
Date: Wed, 17 Jul 2024 10:03:41 +0530
Organization: Motzarella
Lines: 36
Message-ID: <m3v814zlga.fsf@leonis4.robolove.meer.net>
References: <v77761$1fmm0$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Wed, 17 Jul 2024 06:33:27 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c39bb18f41f2a823aca9a4d18cbf6002";
	logging-data="1779301"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/+qSUPmSjTS83reTeQfgBcrPfufGUtZZ0="
Cancel-Lock: sha1:uJ6akMyitcUztgAw/IpqbQ+9aHM=
	sha1:veY5rkpuSgF8H+n0axRabiEhMHM=
Bytes: 2492

* Laroux <v77761$1fmm0$1@dont-email.me> :
Wrote on Wed, 17 Jul 2024 01:36:01 -0000 (UTC):

> Even the color index could instead be a request for the user to select a
> color from the color palette.
>
> For example:
>
> (draw (color (line '(ask) '(ask)) 1))
>
> This would then prompt (both at the REPL and on the canvas) for the user
> to enter the starting and ending coordinates for the line. The user could
> just type the values into the prompt at the REPL, or move the mouse onto
> the canvas click once, move and click a second time.
>
> The GUI part, and acquisition of the mouse coordinates is not where I'm
> stuck. I'm sure I could use something like SDL or Mcclim for this task.
> But, what I am unsure about is how to make a generalized function which
> can read a series of values from the user, and then pass them as
> parameters to the given functions.


as user Interaction is intimately tied to the platform and GUI and
threading model of the GUI, you are constrained by what you have chosen
and your implementation of abstractions over it automatically become
wedded to it, to what your framework provides.

Generalized prompting is provided through mechanisms like Emacs
INTERACTIVE clim Presentation Types, these are from the 1980s and I am
not dont remember newer techniques but these work in their contexts and
are forever being reimplemented in other contexts (platform gui etc) and
after your initial stab at identifying the problems, you perhaps could
study how these are addressed by INTERACTIVE and PRESENTATION-TYPES, so
you can use those principles in your solution