delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/02/25/20:14:20.1

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
Date: Thu, 25 Feb 2016 20:14:15 -0500
Message-Id: <201602260114.u1Q1EFRk019336@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: geda-user AT delorie DOT com
In-reply-to:
<CAC4O8c_eP=Dx8YELmaZ9nvK_3yo97JHRfEYhpi7NXj2dnEBLrg AT mail DOT gmail DOT com>
(geda-user AT delorie DOT com)
Subject: Re: [geda-user] Re: re-instituting GetXY()
References: <CAC4O8c89o1=fvhY=hYBSDb9W1wbruhBFR93r2TPzsuT1ChJkCw AT mail DOT gmail DOT com> <CAC4O8c_eP=Dx8YELmaZ9nvK_3yo97JHRfEYhpi7NXj2dnEBLrg AT mail DOT gmail DOT com>
Reply-To: geda-user AT delorie DOT com

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.

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.

- Raw text -


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