www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/01/14/15:30:37

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:date:message-id:subject:from:to:content-type;
bh=iWDzceN/paIiZUikvDAoHD2QG0TdRSiYGGViv1DSZD0=;
b=U9CjGoLMj1CXa9bc7qvn+pqlrCN0wpqUZnouTtLxVIyUVNAjhenZSNT3Yk2sYPlulF
Qz/F2Y96ig8diiUHeGa6ebmrSJGMs2IA4k2t5IjD3HmEKfbUSozDYG50azn2J0uf3rE5
l7IsWgI/nZcxZX5+muKWwdUEolGsqtYEo6wtC/xg6CaUcjibpu0sGFK2SIU4TVguqDGx
CQhS9MaZEKKDc8PtH6LqT1XdCKzeNDTrOnK1v+jwTffSLvl0jq+wpVjW9P4DJ5dTg15N
JwMFuKPVHmtbwjowCvhOsSlCOINSGyX2OCCyt9QEaKoAMRrFea0PzQSco2dzcB+fgrpp
bUFw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:mime-version:date:message-id:subject:from:to
:content-type;
bh=iWDzceN/paIiZUikvDAoHD2QG0TdRSiYGGViv1DSZD0=;
b=FaReA2TrmYw58Z9XeLP8iJhgZnyyy3r0R3v9+5D7n6C1m1kBHTzffujDTdpENewKNp
y76p40LSMuTUJ629MhdFDkkI0DdfPwStg/watbnF/+x4KhrzQmTMtlsMSV42SAZ2yV2M
2He27ZJwXrlz/ioXk1d+j2uRE13p+UQKyLwvpvU6gx8qZK6YaLPulD+HF24ZP07sCHqU
Fq9grKBJJRnvWQcDMOlwYLnZUlcGak/Z0rVjbkUcow6xNxTqLxxY9DNglDJydYt+cwkA
kV+Cq8j9onH4WPeaGiZBIsLJZdekMT6q6OBlHGLgTk+VFL9Yvj2wuFPwOaEO62vzo9w/
17Vg==
X-Gm-Message-State: ALoCoQm4sqeUPf8SbNsZdBukfG9vlfSp0QLW5AW1nbQH4vBKc/SeCEY6YmcZGW2KAlFIaJhY5abJk3WHn7C3/0TjbxLZ2c3OeQ==
MIME-Version: 1.0
X-Received: by 10.28.107.152 with SMTP id a24mr36240304wmi.101.1452803329291;
Thu, 14 Jan 2016 12:28:49 -0800 (PST)
Date: Thu, 14 Jan 2016 11:28:49 -0900
Message-ID: <CAC4O8c9J6LaRRmNNcV2jJKYV5J430gcB_=wQ5dRMXxc+1xe5JQ@mail.gmail.com>
Subject: [geda-user] pcb behavior when invoked on invlalid file needs to change
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

--001a114768da5f01840529512274
Content-Type: text/plain; charset=UTF-8

If you do e.g.

     pcb not_a_pcb_file.sch

pcb will put a parse error message in the log for you (which you may not
even be viewing) and start editing a new blank pcb with the given file name
remembered.

If you then do File->Save it will silently overwrite not_a_pcb_file.sch
with an empty pcb file.

I got as far as fixing the file format plugin to replicate this behavior
before I stepped back and realized how insane it is.  Something must
change.  Here are the options I can see:

     1.  Make the parse error message much more noticeable (e.g. a pop-up)
and have it include a warning about the destructiveness of any subsequent
File->Save.  Easiest option.  Wouldn't risk messing up batch mode pcb that
depends on current behavior

     2.  Make pcb do what it does after File->Open(not_a_pcb_file.sch):
don't remember the file name if the file doesn't load right (then Save will
do Save As).  Consistency with File->Open is good.  Inconsistent with
traditional unix command line behavior where mentioned files get silently
nuked is slightly bad, but how many users really use deliberately use pcb
to clobber non-pcb files?

     3.  Both the above (without the destructiveness warning since that
wouldn't apply).

I favor the third option.  A log message is not enough for this sort of
situation.  Option 2 seems ok but its still a great way to confuse the user
to show a blank file without explanation of why it isn't what they wanted
to edit, when you can easily help them out in this case.  However I've
never used batch mode pcb so don't know for sure how this might impact it.

Informative opinions welcome.

Britton

--001a114768da5f01840529512274
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div style=3D"">If you do e.g.</div><div style=3D""><b=
r></div><div style=3D"">=C2=A0 =C2=A0 =C2=A0pcb not_a_pcb_file.sch<br></div=
><div style=3D""><br></div><div style=3D"">pcb will put a parse error messa=
ge in the log for you (which you may not even be viewing) and start editing=
 a new blank pcb with the given file name remembered.</div><div style=3D"">=
<br></div><div style=3D"">If you then do File-&gt;Save it will silently ove=
rwrite not_a_pcb_file.sch with an empty pcb file.</div><div style=3D""><br>=
</div><div style=3D"">I got as far as fixing the file format plugin to repl=
icate this behavior before I stepped back and realized how insane it is.=C2=
=A0 Something must change.=C2=A0 Here are the options I can see:</div><div =
style=3D""><br></div><div style=3D"">=C2=A0 =C2=A0 =C2=A01.=C2=A0 Make the =
parse error message much more noticeable (e.g. a pop-up) and have it includ=
e a warning about the destructiveness of any subsequent File-&gt;Save.=C2=
=A0 Easiest option.=C2=A0 Wouldn&#39;t risk messing up batch mode pcb that =
depends on current behavior</div><div style=3D""><br></div><div style=3D"">=
=C2=A0 =C2=A0 =C2=A02.=C2=A0 Make pcb do what it does after File-&gt;Open(n=
ot_a_pcb_file.sch): don&#39;t remember the file name if the file doesn&#39;=
t load right (then Save will do Save As).=C2=A0 Consistency with File-&gt;O=
pen is good.=C2=A0 Inconsistent with traditional unix command line behavior=
 where mentioned files get silently nuked is slightly bad, but how many use=
rs really use deliberately use pcb to clobber non-pcb files?=C2=A0</div><di=
v style=3D""><br></div><div style=3D"">=C2=A0 =C2=A0 =C2=A03.=C2=A0 Both th=
e above (without the destructiveness warning since that wouldn&#39;t apply)=
.</div><div style=3D""><br></div><div style=3D"">I favor the third option.=
=C2=A0 A log message is not enough for this sort of situation.=C2=A0 Option=
 2 seems ok but its still a great way to confuse the user to show a blank f=
ile without explanation of why it isn&#39;t what they wanted to edit, when =
you can easily help them out in this case.=C2=A0 However I&#39;ve never use=
d batch mode pcb so don&#39;t know for sure how this might impact it.</div>=
<div style=3D""><br></div><div style=3D"">Informative opinions welcome.</di=
v><div style=3D""><br></div><div style=3D"">Britton</div><div style=3D""><b=
r></div></div>

--001a114768da5f01840529512274--

- Raw text -


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