delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/02/26/01:21:49

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=TY9wjtISFRyYppGaoFm7m6aeLy3bq33o+0sT58LHc8M=;
b=A3xqKqT3siiOgXepNGyOpDxr3JS+HAedvqIeePJ5ZgYef+QUd7NdpVbTb/Gz6yLNtO
j38he28Sydq4uaeWfYVvZtAz/Uqg2fSF3+OMMdpqYKuOcFQglfQW1SwU42ib+kIvZkNH
Ks/9LEb8rJ1D5KBImUn/lQ/t5fhI2lY+qK1v6LNXcYGytdGHsPV3JqhW2s1+jvf+ehAz
E6Guj+GwBG4fZdpz4G2N4+ORKqyOzuYaUzak9D80zPlRWKAfzAznWvw7pssND4GGf3UV
cwjVLxyGEqgiEOYkcoKNvf79fmrPKK6DLuGaPws1rwIpvFqypVyE76AvE503XVw9BIUS
Mdog==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type;
bh=TY9wjtISFRyYppGaoFm7m6aeLy3bq33o+0sT58LHc8M=;
b=m4nhEQlI/+M+jn/B/6H3IsSqm5VoQUeN1ozrqNuGIOhRV5kgvoIUUxUZMSRuNhzEft
DL+FnnfkX6BsZ9HoyX0LUJl7iYo06Uk7qChy1whMt20+qTH+gGWMNYQL7M96WWsLFVp6
5/RAIJpUVi2QL/BppZFdhD4E9pyi23JadezTIbOBxUpBS+AHH0yud5lDf1xICpaBOvmd
oRsvJCPua13aAsJQdx0mfGfGvntzpYxQZNYvNanO/NcnXKWmd8/ke2DX/6Lf+4BkELW1
wOhxJlAQUW5FTj3j/kf6JxC6BncXTD6/IsWuLhNNUyZFYVEDuiyokp2cI6r0NomqTsw5
5drw==
X-Gm-Message-State: AG10YORdKzCZjTdDeihilU1xkVMuEuyE6EaRwkY9S1War6+8/WCHO74jP9huM7U0gMd6wTNONk+gCJqskIn+aQ==
MIME-Version: 1.0
X-Received: by 10.194.90.137 with SMTP id bw9mr47998536wjb.120.1456467655016;
Thu, 25 Feb 2016 22:20:55 -0800 (PST)
In-Reply-To: <201602260114.u1Q1EFRk019336@envy.delorie.com>
References: <CAC4O8c89o1=fvhY=hYBSDb9W1wbruhBFR93r2TPzsuT1ChJkCw AT mail DOT gmail DOT com>
<CAC4O8c_eP=Dx8YELmaZ9nvK_3yo97JHRfEYhpi7NXj2dnEBLrg AT mail DOT gmail DOT com>
<201602260114 DOT u1Q1EFRk019336 AT envy DOT delorie DOT com>
Date: Thu, 25 Feb 2016 21:20:54 -0900
Message-ID: <CAC4O8c9ZxsCOanQCm5tjZJaTFF1YVeRywynEkgJfXcXv=covsA@mail.gmail.com>
Subject: Re: [geda-user] Re: re-instituting GetXY()
From: "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, Feb 25, 2016 at 4:14 PM, DJ Delorie <dj AT delorie DOT com> wrote:
>
> They work in some indirect way you don't understand, but it's very
> indirect so no blame there, and probably should be fixed.
>
> Each action is registered with a flag for the core ("need_coord_msg")
> that says whether it requires an X,Y location from the user, and if
> so, provides a prompt for that X,Y location.  The GUIs display that
> prompt while waiting for the user to click.
>
> GetXY() is a "filler" action which exists *only* to request an X,Y
> click from the user, for actions that don't (or optionally) need
> coords, or don't have a message appropriate for the case being issued
> (i.e. if there are multiple actions to be executed, the GetXY() might
> be appropriate for the *group* results, not the first action that
> happens to need a coordinate).
>
> The catch is that the core asks for the X,Y click *before* the action
> is called, so there's no way for any argument to GetXY() to have any
> effect.  The string "printed" is the empty one in the struct where
> GetXY() is registered.

There's the possibility to brutally special-case hid_actionv() to display
the prompt by assigning need_coord_msg().  It does work and GetXY()
is fairly special.

> It should probably be changed so that GetXY() doesn't register a need
> for a coordinate, but calls the same function internally with a
> suitable string.

Meaning change ghid_get_coords() to take the detailed message args passed
to the GetXY and do something like what ghid_handle_user_command() does
to display them?

Britton

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019