Tue, Feb 15 2005
08:09:25
|
|
Request created by hbowman
|
|
Subject: G_parser() for GUIs and HTML help: missing opt->key_desc text
The auto-gen tcl/tk GUIs and the HTML/man pages are missing the opt->key_desc
text which makes filling in the blanks that much harder to do. Especially
because the menus and help pages are usually used by users who don't know the
options well and won't be using --help from the command line yet.
e.g. d.frame:
frame.c: parm.at->key_desc = "bottom,top,left,right";
G6.0b2> d.frame --help
...
d.frame [-cepslD] [frame=name] [at=bottom,top,left,right]
...
while the d.frame.html / man page:
...
d.frame [-cepslD] [frame=string] [at=float]
...
and the tcltk GUI:
G6.0b2> d.frame
[tcltk GUI]
..
Where to place the frame (implies -c), values in percent (float, optional) :
[________________________________]
the help pages and GUI are really very unhelpful in this situation.
This confused me for a few minutes when trying to use v.mkgrid from the GUI:
number of ROWS and COLUMNS in grid (integer, required)
[_____________________________]
I wanted 5x5 so I put "5", which gave this error
Error: option <grid> must be provided in multiples of 2
You provided 1 items:
5
I took that error to mean it wanted the single integer to be a multiple of 2,
so I tried grid=6 with similar errors.. maybe I'm a bonehead but as a new
user I'd never have guessed the format should be "rows,columns" not "5x5" or
"5" ... it took a biologist to point out the solution to me, how embarrassing
:).
It would be really nice to fix this one for 6.0.
Hamish
|
|
Tue, Jul 12 2005
09:28:51
|
|
Comments added by hbowman
|
|
Cc: grass5@grass.itc.it
HTML/man docs and GUIs should now show opt->key_desc if it exists.
e.g. makes v.mkgrid's help page and GUI options much easier to figure out.
applied to 6.0.x and 6.1 cvs branches. please test!
TODO: (by someone who knows some TCL)
Edit lib/gis/gui.tcl so that the option description in the GUI indicates if
multiple answers are ok.
e.g. (string[,string,...]; required)
or something like that.
"mult" = 0 or 1 is already there, just need to test & append the string.
Hamish
|
|
Tue, Jul 12 2005
09:30:05
|
|
Priority changed to 40 by hbowman
|
|
Tue, Jul 12 2005
09:30:53
|
|
Subject changed to gui.tcl: indicate if multiple answers are ok by hbowman
|
|
Tue, Jul 12 2005
09:31:08
|
|
Area changed to grass6 by hbowman
|
|
Tue, Jul 12 2005
10:59:03
|
|
Mail sent by neteler@itc.it
|
|
Return-Path |
<neteler@itc.it>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Date |
Tue, 12 Jul 2005 10:59:00 +0200
|
From |
Markus Neteler <neteler@itc.it>
|
To |
Harmish Bowman via RT <grass-bugs@intevation.de>
|
Cc |
grass5@grass.itc.it
|
Subject |
Re: [GRASS5] [bug #3002] (grass) G_parser() for GUIs and HTML help: missing opt->key_desc text
|
Message-ID |
<20050712085900.GG28754@thuille.itc.it>
|
Mail-Followup-To |
Harmish Bowman via RT <grass-bugs@intevation.de>, grass5@grass.itc.it
|
References |
<20050712072851.F0D171005B1@lists.intevation.de>
|
Mime-Version |
1.0
|
Content-Type |
text/plain; charset=us-ascii
|
Content-Disposition |
inline
|
In-Reply-To |
<20050712072851.F0D171005B1@lists.intevation.de>
|
User-Agent |
Mutt/1.4.1i
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
On Tue, Jul 12, 2005 at 09:28:51AM +0200, Harmish Bowman via RT wrote:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=3002
>
> HTML/man docs and GUIs should now show opt->key_desc if it exists.
>
> e.g. makes v.mkgrid's help page and GUI options much easier to figure out.
>
> applied to 6.0.x and 6.1 cvs branches. please test!
Hamish,
looks like a great improvement!
> TODO: (by someone who knows some TCL)
> Edit lib/gis/gui.tcl so that the option description in the GUI indicates if
> multiple answers are ok.
>
> e.g. (string[,string,...]; required)
>
> or something like that.
>
> "mult" = 0 or 1 is already there, just need to test & append the string.
>
Unfortunately I can't help much with tcl...
Markus
|
|
Tue, Jul 12 2005
18:54:41
|
|
Mail sent by michael.barton@asu.edu
|
|
Return-Path |
<Michael.Barton@asu.edu>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Date |
Tue, 12 Jul 2005 09:54:18 -0700
|
From |
Michael Barton <michael.barton@asu.edu>
|
Subject |
Re: [GRASS5] [bug #3002] (grass) G_parser() for GUIs and HTML help: missing opt->key_desc text
|
In-reply-to |
<20050712072851.F0D171005B1@lists.intevation.de>
|
To |
Hamish <hamish_nospam@yahoo.com>
|
Cc |
Paolo Cavallini via RT <grass-bugs@intevation.de>
|
Message-id |
<BEF943CA.131C8%michael.barton@asu.edu>
|
MIME-version |
1.0
|
Content-type |
text/plain; charset=US-ASCII
|
Content-transfer-encoding |
7bit
|
User-Agent |
Microsoft-Entourage/11.1.0.040913
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
Hamish,
I don't know if I know enough TCL or not to do this, but am willing to look
into it. However, I haven't been following this discussion closely while I
was away in Valencia.
So I don't quite understand what you are doing here. Could you explain it to
me in a bit more detail?
Thanks
Michael
______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA
voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
> From: Harmish Bowman via RT <grass-bugs@intevation.de>
> Reply-To: Harmish Bowman via RT <grass-bugs@intevation.de>
> Date: Tue, 12 Jul 2005 09:28:51 +0200 (CEST)
> Cc: <grass5@grass.itc.it>
> Subject: [GRASS5] [bug #3002] (grass) G_parser() for GUIs and HTML help:
> missing opt->key_desc text
>
> this bug's URL: http://intevation.de/rt/webrt?serial_num=3002
>
> Request number 3002 was commented on by 'hbowman' (Harmish Bowman).
> Responding to this message will send mail to the requestor.
>
> Request Tracker
> rt@intevation.de
>
> --------------------------------------------------------------
> Cc: grass5@grass.itc.it
>
> HTML/man docs and GUIs should now show opt->key_desc if it exists.
>
> e.g. makes v.mkgrid's help page and GUI options much easier to figure out.
>
> applied to 6.0.x and 6.1 cvs branches. please test!
>
>
> TODO: (by someone who knows some TCL)
> Edit lib/gis/gui.tcl so that the option description in the GUI indicates if
> multiple answers are ok.
>
> e.g. (string[,string,...]; required)
>
> or something like that.
>
> "mult" = 0 or 1 is already there, just need to test & append the string.
>
>
>
> Hamish
>
>
>
> -------------------------------------------- Managed by Request Tracker
>
|
|
Tue, Jul 12 2005
20:52:17
|
|
Mail sent by glynn@gclements.plus.com
|
|
Return-Path |
<glynn@gclements.plus.com>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
From |
Glynn Clements <glynn@gclements.plus.com>
|
MIME-Version |
1.0
|
Content-Type |
multipart/mixed; boundary="vTk8pLE6xB"
|
Content-Transfer-Encoding |
7bit
|
Message-ID |
<17108.4431.178096.319690@gargle.gargle.HOWL>
|
Date |
Tue, 12 Jul 2005 19:51:59 +0100
|
To |
Harmish Bowman via RT <grass-bugs@intevation.de>
|
Cc |
grass5@grass.itc.it
|
Subject |
Re: [GRASS5] [bug #3002] (grass) G_parser() for GUIs and HTML help: missing opt->key_desc text
|
In-Reply-To |
<20050712072851.F0D171005B1@lists.intevation.de>
|
References |
<20050712072851.F0D171005B1@lists.intevation.de>
|
X-Mailer |
VM 7.07 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
--vTk8pLE6xB
Content-Type: text/plain; charset=us-ascii
Content-Description: message body and .signature
Content-Transfer-Encoding: 7bit
Harmish Bowman via RT wrote:
> TODO: (by someone who knows some TCL)
> Edit lib/gis/gui.tcl so that the option description in the GUI indicates if
> multiple answers are ok.
>
> e.g. (string[,string,...]; required)
>
> or something like that.
>
> "mult" = 0 or 1 is already there, just need to test & append the string.
Try the attached patch.
--
Glynn Clements <glynn@gclements.plus.com>
--vTk8pLE6xB
Content-Type: text/plain
Content-Description: gui.tcl multiple answers patch
Content-Disposition: inline;
filename="gui.tcl.diff"
Content-Transfer-Encoding: 7bit
--- lib/gis/gui.tcl~ 2005-01-08 13:08:59.000000000 +0000
+++ lib/gis/gui.tcl 2005-07-12 19:50:31.000000000 +0100
@@ -257,12 +257,13 @@
pack $suf.val$optn.val -side left -fill x -expand yes
}
-proc do_label {dlg optn desc type reqd} {
+proc do_label {dlg optn desc type reqd mult} {
global opt
set suf $opt($dlg,suf)
set req [expr {$reqd ? "required" : "optional"}]
- label $suf.lab$optn -text "$desc ($type, $req):" -anchor w -justify left
+ set multi [expr {$mult ? ", multiple" : ""}]
+ label $suf.lab$optn -text "$desc ($type$multi, $req):" -anchor w -justify left
pack $suf.lab$optn -side top -fill x
}
@@ -316,7 +317,7 @@
set opt($dlg,$optn,$key) $opts($key)
}
- do_label $dlg $optn $opts(desc) $opts(type) $opts(required)
+ do_label $dlg $optn $opts(desc) $opts(type) $opts(required) $opts(multi)
frame $suf.val$optn
if {$opts(options) != {}} {
--vTk8pLE6xB--
|
|
Sun, Apr 16 2006
21:16:57
|
|
Mail sent by guest
|
|
I commited the following to cvs:
Instead of displaying (key_desc, optional/required) gui.tcl now displays
(name: [multiple] key_desc, opional/required). Examples:
(maps: multiple string, required)
(color: string, optional)
(cats: multiple int, optional)
etc... |
|
Sun, Apr 16 2006
21:17:51
|
|
Status changed to resolved by cshock
|
|