Details Ticket 4604


Comment | Reply | Open


Serial Number 4604
Subject tcl/tk GUI: v.digit can't create new vector in GUI mode
Area grass6
Queue grass
Requestors epatton@nrcan.gc.ca
Owner mbarton
Status resolved
Last User Contact Fri Aug 4 18:10:41 2006 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Fri Aug 4 18:10:47 2006 (2 yr ago)
Created Wed Jun 14 14:42:01 2006 (2 yr ago)

Transaction History Ticket 4604


Wed, Jun 14 2006 14:42:01    Request created by guest  
Subject: Cannot create new empty vector for digitizing session with v.digit

Platform: GNU/Linux/x86
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: CVS checked out 2006-06-14

v.digit -n creates a new empty vector, but doesn't start monitor x0 or the v.digit
toolbar:

v.digit -n map=test bgcmd="d.rast -o map=Chart4011-01"

<From the output tab on the v.digit GUI>:

GRASS_INFO_MESSAGE(8026,1): New empty map created.

Application initialization failed: "-n" option requires an additional argument
Error in startup script: couldn't read file "map=test": no such file or directory
~ Eric.
Fri, Jun 16 2006 08:28:22    Owner changed to mbarton by mneteler  
Fri, Jun 16 2006 08:28:22    Mail sent by mneteler  
Eric,

confirmed. The GUI is messing something up.

Markus
Fri, Jun 16 2006 08:28:54    Mail sent by mneteler  
... On command line it works.
Michael, could you take a look?

Markus
Fri, Jun 16 2006 16:41:47    Mail sent by michael.barton@asu.edu  
Return-Path <Michael.Barton@asu.edu>
Delivered-To grass-bugs@lists.intevation.de
User-Agent Microsoft-Entourage/11.2.3.060209
Date Fri, 16 Jun 2006 07:41:42 -0700
Subject Re: [bug #4604] (grass) Transaction (mneteler)
From Michael Barton <michael.barton@asu.edu>
To Paolo Cavallini via RT <grass-bugs@intevation.de>
Message-ID <C0B81136.BC4F%michael.barton@asu.edu>
Thread-Topic [bug #4604] (grass) Transaction (mneteler)
Thread-Index AcaRUvuIOhDEMP1GEdq4DwAKlXAweg==
In-Reply-To <20060616062854.AF8251005C5@lists.intevation.de>
Mime-version 1.0
Content-type text/plain; charset="US-ASCII"
Content-transfer-encoding 7bit
X-Virus-Scanned by amavisd-new
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
I'm out of town for a week. Maybe Cedric can look. I'll check when I get
back.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton



> From: Markus Neteler via RT <grass-bugs@intevation.de>
> Reply-To: Markus Neteler via RT <grass-bugs@intevation.de>
> Date: Fri, 16 Jun 2006 08:28:54 +0200 (CEST)
> To: <michael.barton@asu.edu>
> Subject: [bug #4604] (grass) Transaction (mneteler)
> 
> this bug's URL: http://intevation.de/rt/webrt?serial_num=4604
> 
> Fri, Jun 16 2006 08:28:54: Request 4604 was acted upon.
> 
>  Transaction: Mail sent by mneteler
>  
>        Queue: grass
>         Area: grass6
>      Subject: Cannot create new empty vector for digitizing session with
> v.digit
>        Owner: mbarton
>   Requestors: epatton@nrcan.gc.ca
>       Status: open
> 
> -------------------------------------------------------------------------
> ... On command line it works.
> 
> Michael, could you take a look?
> 
> 
> 
> Markus
> 
> -------------------------------------------- Managed by Request Tracker


Sun, Jul 23 2006 22:32:44    Subject changed to tcl/tk GUI: v.digit can't create new vector in GUI mode by msieczka  
Sun, Jul 23 2006 22:33:24    Mail sent by msieczka  
This bug is still valid in current CVS.

Maciek
Mon, Jul 24 2006 16:01:27    Mail sent by epatton@nrcan.gc.ca  
Return-Path <epatton@nrcan.gc.ca>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <0E5A77B55A57D511BB3F0002A537C26208C55AF5@s5-dar-r1.nrn.nrcan.gc.ca>
From "Patton, Eric" <epatton@nrcan.gc.ca>
To 'Maciek Sieczka via RT ' <grass-bugs@intevation.de>, "'grass-dev@grass.itc.it'" <grass-dev@grass.itc.it>
Cc "'Michael.Barton@asu.edu '" <Michael.Barton@asu.edu>
Subject RE: [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vect or in GUI mode
Date Mon, 24 Jul 2006 11:01:23 -0300
MIME-Version 1.0
X-Mailer Internet Mail Service (5.5.2657.72)
x-originalarrivaltime <rt@intevation.de>
x-envelope-from <rt@intevation.de>
x-envelope-to <rt@intevation.de>
x-warning <rt@intevation.de>
x-whitelist <rt@intevation.de>
x-sender <rt@intevation.de>
x-rt-loop-prevention <rt@intevation.de>
x-request-id <rt@intevation.de>
x-managed-by <rt@intevation.de>
Content-Type text/plain; charset="iso-8859-1"
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-3.823 tagged_above=-999 required=3 tests=[AWL=1.177, BAYES_00=-5]
X-Spam-Level
Confirmed; some caveats below.

For starters, v.digit from the CLI fails to automatically open an X-monitor;
whether this is intentional or not, it's inconsistent with the v.digit GUI
version, as that one opens x0 automatically.

##################
#  v.digit -n CLI
##################

d.mon x0; v.digit -n map=Bugtest1 
New empty map created.


############################
#  v.digit CLI (no -n flag)
############################

d.mon x0 ; v.digit map=Opilio_ROV_Stations    

using default visual which is TrueColor
ncolors: 16777216
Graphics driver [x0] started
Segmentation fault

This is important - if I try to query the vector Opilio_ROV_Stations from
the gis.m query tool,  topology seems to be destroyed!

$ v.what -a map=Opilio_ROV_Stations east_north=647925.576373,5169619.14795
distance=16.2926107986 (copied from Output screen of gis.m)

(From Output screen): Opilio_ROV_Stations: You must build topology on vector
file

Ok, let's build some topology...

v.build Opilio_ROV_Stations
Building topology ...
18 primitives registered
Building areas:  100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids:  100%
Topology was built.
Number of nodes     :   12
Number of primitives:   18
Number of points    :   12
Number of lines     :   6
Number of boundaries:   0
Number of centroids :   0
Number of areas     :   0
Number of isles     :   0

Now, if I try to edit this vector again with the CLI command 

d.mon x0 ; v.digit map=Opilio_ROV_Stations

using default visual which is TrueColor
ncolors: 16777216
Graphics driver [x0] started
Segmentation fault

Similarly, topology is again destroyed as I can't query this vector until I
rebuild topology.


Moving on to the GUI version of v.digit.....

Running the command

v.digit map=Bugtest2 'bgcmd=d.rast -o
map=CheticampAll_Aug2005_10m.shade.comb' displays my background map in x0,
but no v.digit toolbar opens! The corresponding output from gis.m:

GRASS_INFO_MESSAGE(9662,1): New empty map created.

Application initialization failed: "-n" option requires an additional
argument
Error in startup script: couldn't read file "map=Bugtest2": no such file or
directory

I thought -n was supposed to take care of creating the new vector for me.
What additional argument is it talking about?

Now let's try editing an existing vector through the GUI:

v.digit map=Disposal_Sites 

x0 opens, but that's it.


~ Eric.
 

-----Original Message-----
From: Maciek Sieczka via RT
To: Patton, Eric
Cc: Michael.Barton@asu.edu
Sent: 7/23/2006 4:33 PM
Subject: [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vector in
GUI mode

This bug is still valid in current CVS.

Maciek


-------------------------------------------- Managed by Request Tracker


Mon, Jul 24 2006 17:20:34    Mail sent by michael.barton@asu.edu  
Return-Path <michael.barton@asu.edu>
Delivered-To grass-bugs@lists.intevation.de
User-Agent Microsoft-Entourage/11.2.5.060620
Date Mon, 24 Jul 2006 08:20:22 -0700
Subject Re: [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vect or in GUI mode
From Michael Barton <michael.barton@asu.edu>
To "Patton, Eric" <epatton@nrcan.gc.ca>, Paolo Cavallini via RT <grass-bugs@intevation.de>, "'grass-dev@grass.itc.it'" <grass-dev@grass.itc.it>
Message-ID <C0EA3346.CA9A%michael.barton@asu.edu>
Thread-Topic [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vect or in GUI mode
Thread-Index AcavNK4O7LUMXBsnEduhmgAKlXAweg==
In-Reply-To <0E5A77B55A57D511BB3F0002A537C26208C55AF5@s5-dar-r1.nrn.nrcan.gc.ca>
Mime-version 1.0
Content-type text/plain; charset="US-ASCII"
Content-transfer-encoding 7bit
X-Virus-Scanned by amavisd-new
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-3.652 tagged_above=-999 required=3 tests=[BAYES_00=-5, RCVD_NUMERIC_HELO=1.348]
X-Spam-Level
Eric,

This is kind of a backhanded compliment I guess. From the command line,
GRASS has always had fairly primitive display control ability. NOTHING will
automatically open a display monitor of any kind.

Radim added the ability to  automatically open an x11 display monitor when
d.rast or d.vect was run to the Display Manager in GRASS 5 and 6. I added it
to the v.digit button in the old GIS Manager for GRASS 6 and someone else
added automatic background display.

These conveniences are all in the TclTk code that creates the GIS Manager.
>From the command line, you do all this manually...

D.mon start=x0
V.digit [vector map] bk=[background commands]
Etc.

Displaying things in the TclTk canvas, with display controls is completely
done within TclTk code, using display output to PPM files. This is where
things get problematic with v.digit, which only displays to an x11 monitor.

So this is NOT a bug. It is the way that the GRASS CLI is supposed to work.
You can make it a wish, however.

Cheers
Michael

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton



> From: "Patton, Eric" <epatton@nrcan.gc.ca>
> Date: Mon, 24 Jul 2006 11:01:23 -0300
> To: 'Maciek Sieczka via RT ' <grass-bugs@intevation.de>,
> "'grass-dev@grass.itc.it'" <grass-dev@grass.itc.it>
> Cc: "'Michael.Barton@asu.edu '" <Michael.Barton@asu.edu>
> Subject: RE: [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vect
or
> in GUI mode
> 
> Confirmed; some caveats below.
> 
> For starters, v.digit from the CLI fails to automatically open an X-monitor;
> whether this is intentional or not, it's inconsistent with the v.digit GUI
> version, as that one opens x0 automatically.
> 
> ##################
> #  v.digit -n CLI
> ##################
> 
> d.mon x0; v.digit -n map=Bugtest1
> New empty map created.
> 
> 
> ############################
> #  v.digit CLI (no -n flag)
> ############################
> 
> d.mon x0 ; v.digit map=Opilio_ROV_Stations
> 
> using default visual which is TrueColor
> ncolors: 16777216
> Graphics driver [x0] started
> Segmentation fault
> 
> This is important - if I try to query the vector Opilio_ROV_Stations from
> the gis.m query tool,  topology seems to be destroyed!
> 
> $ v.what -a map=Opilio_ROV_Stations east_north=647925.576373,5169619.14795
> distance=16.2926107986 (copied from Output screen of gis.m)
> 
> (From Output screen): Opilio_ROV_Stations: You must build topology on vector
> file
> 
> Ok, let's build some topology...
> 
> v.build Opilio_ROV_Stations
> Building topology ...
> 18 primitives registered
> Building areas:  100%
> 0 areas built
> 0 isles built
> Attaching islands:
> Attaching centroids:  100%
> Topology was built.
> Number of nodes     :   12
> Number of primitives:   18
> Number of points    :   12
> Number of lines     :   6
> Number of boundaries:   0
> Number of centroids :   0
> Number of areas     :   0
> Number of isles     :   0
> 
> Now, if I try to edit this vector again with the CLI command
> 
> d.mon x0 ; v.digit map=Opilio_ROV_Stations
> 
> using default visual which is TrueColor
> ncolors: 16777216
> Graphics driver [x0] started
> Segmentation fault
> 
> Similarly, topology is again destroyed as I can't query this vector until I
> rebuild topology.
> 
> 
> Moving on to the GUI version of v.digit.....
> 
> Running the command
> 
> v.digit map=Bugtest2 'bgcmd=d.rast -o
> map=CheticampAll_Aug2005_10m.shade.comb' displays my background map in x0,
> but no v.digit toolbar opens! The corresponding output from gis.m:
> 
> GRASS_INFO_MESSAGE(9662,1): New empty map created.
> 
> Application initialization failed: "-n" option requires an additional
> argument
> Error in startup script: couldn't read file "map=Bugtest2": no such file or
> directory
> 
> I thought -n was supposed to take care of creating the new vector for me.
> What additional argument is it talking about?
> 
> Now let's try editing an existing vector through the GUI:
> 
> v.digit map=Disposal_Sites
> 
> x0 opens, but that's it.
> 
> 
> ~ Eric.
>  
> 
> -----Original Message-----
> From: Maciek Sieczka via RT
> To: Patton, Eric
> Cc: Michael.Barton@asu.edu
> Sent: 7/23/2006 4:33 PM
> Subject: [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vector in
> GUI mode
> 
> This bug is still valid in current CVS.
> 
> Maciek
> 
> 
> -------------------------------------------- Managed by Request Tracker


Mon, Jul 24 2006 17:44:41    Mail sent by msieczka  
michael.barton@asu.edu wrote (Mon, Jul 24 2006 17:20:34):

> So this is NOT a bug. It is the way that the GRASS CLI is supposed to work.
> You can make it a wish, however.

Michael,

You are right that it is not a bug, that v.digit from CLI doesn't spawn a
monitor automatically. It shouldn't do that and this is clear.

However, there *is* a bug v.digit in tcl/tk GUI mode that prevents it from
creating a new vector. Try to reproduce it, like this:

$ d.mon x0
$ v.digit&

Now type in the new vector name and check the "Create new file..." button (so
that the whole command is eg. "v.digit map=new_vector -n"), press Run

The output is:

GRASS_INFO_MESSAGE(17052,1): New empty map created.
Application initialization failed: "-n" option requires an additional argument
Error in startup script: couldn't read file "map=new_vector": no such file or
directory

As Markus said, this works from CLI fine so this might be a GUI specific
issue. Can you look into this?



Eric,

The segfault in v.digit is a recent, unrelated bug. I have already posted to
dev list about that so hopefully someone will look into this. Let's not mix
things in BT.


Best to you All,
Maciek
Mon, Jul 24 2006 18:54:25    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 text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <17604.64315.654469.779543@cerise.gclements.plus.com>
Date Mon, 24 Jul 2006 17:54:19 +0100
To Maciek Sieczka via RT <grass-bugs@intevation.de>
Cc epatton@nrcan.gc.ca, grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vector in GUI mode
In-Reply-To <20060724154441.993B81006A5@lists.intevation.de>
References <20060724154441.993B81006A5@lists.intevation.de>
X-Mailer VM 7.07 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-3.533 tagged_above=-999 required=3 tests=[AWL=1.201, BAYES_00=-5, FORGED_RCVD_HELO=0.266]
X-Spam-Level
Maciek Sieczka via RT wrote:

> > So this is NOT a bug. It is the way that the GRASS CLI is supposed to work.
> > You can make it a wish, however.
> 
> Michael,
> 
> You are right that it is not a bug, that v.digit from CLI doesn't spawn a
> monitor automatically. It shouldn't do that and this is clear.
> 
> However, there *is* a bug v.digit in tcl/tk GUI mode that prevents it from
> creating a new vector. Try to reproduce it, like this:
> 
> $ d.mon x0
> $ v.digit&
> 
> Now type in the new vector name and check the "Create new file..." button (so
> that the whole command is eg. "v.digit map=new_vector -n"), press Run
> 
> The output is:
> 
> GRASS_INFO_MESSAGE(17052,1): New empty map created.
> Application initialization failed: "-n" option requires an additional argument
> Error in startup script: couldn't read file "map=new_vector": no such file
or
> directory

Those error messages come from Tk; it's because v.digit is passing its
command-line options to Tk, which is trying to interpret them.

Note:
	$ wish map=new_vector -n
	Application initialization failed: "-n" option requires an additional argument
Error in startup script: couldn't read file "map=new_vector": no such file or
directory

v.digit needs to pass a "fake" command-line to Tk_Main().

> As Markus said, this works from CLI fine so this might be a GUI specific
> issue. Can you look into this?

That exact case shouldn't work from the command line either. However,
putting the -n first will eliminate the error message, as it will have
the argument which it requires (Tk treats -n as a shorthand for
-name).

-- 
Glynn Clements <glynn@gclements.plus.com>


Tue, Jul 25 2006 07:41:06    Mail sent by michael.barton@asu.edu  
Return-Path <michael.barton@asu.edu>
Delivered-To grass-bugs@lists.intevation.de
User-Agent Microsoft-Entourage/11.2.5.060620
Date Mon, 24 Jul 2006 22:39:12 -0700
Subject Re: [GRASS-dev] [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vector in GUI mode
From Michael Barton <michael.barton@asu.edu>
To Glynn Clements <glynn@gclements.plus.com>, Paolo Cavallini via RT <grass-bugs@intevation.de>
Cc "Patton, Eric" <epatton@nrcan.gc.ca>, <grass-dev@grass.itc.it>, Lorenzo Moretti <lorenzo.moretti@bologna.enea.it>
Message-ID <C0EAFC90.CACD%michael.barton@asu.edu>
Thread-Topic [GRASS-dev] [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vector in GUI mode
Thread-Index AcavrKhU5tpehRufEduqZgAKlXAweg==
In-Reply-To <17604.64315.654469.779543@cerise.gclements.plus.com>
Mime-version 1.0
Content-type text/plain; charset="US-ASCII"
Content-transfer-encoding 7bit
X-Virus-Scanned by amavisd-new
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-3.652 tagged_above=-999 required=3 tests=[AWL=0.000, BAYES_00=-5, RCVD_NUMERIC_HELO=1.348]
X-Spam-Level
I'm at home on my laptop. However, I just updated all gism files from the
cvs.

I had no problem editing an existing vector from the GUI before or after
updating. 

Before updating all gism files, I could NOT create a new vector to digitize
by doing the following: 1) add a vector layer, 2) type a new name (i.e.,
vector name that does not currently exist) into the vector name entry field,
3) press the digitize button.

After updating, I COULD create a new vector to digitize by doing the steps
listed above. As of Friday, I completed a set of changes to the way that
TclTk parses GRASS commands, in line with Glynn's suggestions. This made
several things begin to work again on my Mac that had been behaving
strangely. Maybe it fixed the v.digit issue.

The TclTk code for creating a new vector is as Glynn indicates below
(v.digit -n map=[new map name]).

One complicating issue is that a couple months ago, Lorenzo Moretti began to
include a version of v.digit, specifically for the Mac, that fixed some of
the problems of the last several months. However, this only worked in TclTk
aqua. I don't know if this is in the binary version I'm running on my laptop
here at home (10 June 2006). However, I'm running gism in x11
mode--including v.digit (i.e., it does NOT open in TclTk aqua)--and v.digit
works OK.

So it works for me currently. Maybe it now works for you all too (as of
Friday). Update to the most recent versions of all TclTk interface files and
see. If it doesn't work for you all after this, there is still hope. I can
confirm that there IS a version that does work and it works on TclTk for x11
as well as aqua. I'm using it currently. This version needs to be submitted
to the GRASS cvs for testing. I'm copying Lorenzo to see if he has anything
to add to this, since I'm using his 6 June binary with my TclTk code
updates.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton



> From: Glynn Clements <glynn@gclements.plus.com>
> Date: Mon, 24 Jul 2006 17:54:19 +0100
> To: Maciek Sieczka via RT <grass-bugs@intevation.de>
> Cc: <epatton@nrcan.gc.ca>, <grass-dev@grass.itc.it>
> Subject: Re: [GRASS-dev] [bug #4604] (grass) tcl/tk GUI: v.digit can't create
> new vector in GUI mode
> 
> 
> Maciek Sieczka via RT wrote:
> 
>>> So this is NOT a bug. It is the way that the GRASS CLI is supposed to work.
>>> You can make it a wish, however.
>> 
>> Michael,
>> 
>> You are right that it is not a bug, that v.digit from CLI doesn't spawn a
>> monitor automatically. It shouldn't do that and this is clear.
>> 
>> However, there *is* a bug v.digit in tcl/tk GUI mode that prevents it from
>> creating a new vector. Try to reproduce it, like this:
>> 
>> $ d.mon x0
>> $ v.digit&
>> 
>> Now type in the new vector name and check the "Create new file..." button
(so
>> that the whole command is eg. "v.digit map=new_vector -n"), press Run
>> 
>> The output is:
>> 
>> GRASS_INFO_MESSAGE(17052,1): New empty map created.
>> Application initialization failed: "-n" option requires an additional
>> argument
>> Error in startup script: couldn't read file "map=new_vector": no such file
or
>> directory
> 
> Those error messages come from Tk; it's because v.digit is passing its
> command-line options to Tk, which is trying to interpret them.
> 
> Note:
> $ wish map=new_vector -n
> Application initialization failed: "-n" option requires an additional argument
> Error in startup script: couldn't read file "map=new_vector": no such file
or
> directory
> 
> v.digit needs to pass a "fake" command-line to Tk_Main().
> 
>> As Markus said, this works from CLI fine so this might be a GUI specific
>> issue. Can you look into this?
> 
> That exact case shouldn't work from the command line either. However,
> putting the -n first will eliminate the error message, as it will have
> the argument which it requires (Tk treats -n as a shorthand for
> -name).
> 
> -- 
> Glynn Clements <glynn@gclements.plus.com>
> 
> 


Tue, Jul 25 2006 10:03:38    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 text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <17605.53305.859682.545334@cerise.gclements.plus.com>
Date Tue, 25 Jul 2006 09:03:05 +0100
To Michael Barton <michael.barton@asu.edu>
Cc Paolo Cavallini via RT <grass-bugs@intevation.de>, "Patton, Eric" <epatton@nrcan.gc.ca>, grass-dev@grass.itc.it, Lorenzo Moretti <lorenzo.moretti@bologna.enea.it>
Subject Re: [GRASS-dev] [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vector in GUI mode
In-Reply-To <C0EAFC90.CACD%michael.barton@asu.edu>
References <17604.64315.654469.779543@cerise.gclements.plus.com> <C0EAFC90.CACD%michael.barton@asu.edu>
X-Mailer VM 7.07 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-3.545 tagged_above=-999 required=3 tests=[AWL=1.189, BAYES_00=-5, FORGED_RCVD_HELO=0.266]
X-Spam-Level
Michael Barton wrote:

> The TclTk code for creating a new vector is as Glynn indicates below
> (v.digit -n map=[new map name]).

However, the Tcl/Tk code which is generated by G_parser() when the
--gui or --tcltk switches are used puts the options before the flags.

-- 
Glynn Clements <glynn@gclements.plus.com>


Wed, Aug 2 2006 20:44:23    Mail sent by mneteler  
This was trivial to fix (seeing Glynn's last comment).
Strange that it didn't happen.

Fixed.

Markus
Wed, Aug 2 2006 20:44:27    Status changed to resolved by mneteler  
Wed, Aug 2 2006 22:36:13    Mail sent by michael.barton@asu.edu  
Return-Path <michael.barton@asu.edu>
Delivered-To grass-bugs@lists.intevation.de
User-Agent Microsoft-Entourage/11.2.5.060620
Date Wed, 02 Aug 2006 13:37:05 -0700
Subject Re: [bug #4604] (grass) Transaction (mneteler)
From Michael Barton <michael.barton@asu.edu>
To Paolo Cavallini via RT <grass-bugs@intevation.de>
Message-ID <C0F65B01.232CA%michael.barton@asu.edu>
Thread-Topic [bug #4604] (grass) Transaction (mneteler)
Thread-Index Aca2c2pyqNDPJCJmEduJMwAUUSYxwg==
In-Reply-To <20060802184423.333B3101EFB@lists.intevation.de>
Mime-version 1.0
Content-type text/plain; charset="US-ASCII"
Content-transfer-encoding 7bit
X-Virus-Scanned by amavisd-new
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-2.59 tagged_above=-999 required=3 tests=[AWL=1.062, BAYES_00=-5, RCVD_NUMERIC_HELO=1.348]
X-Spam-Level
Great. It's a shame that we're moving away from TclTk just as you're getting
good at it ;-)

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


> From: Markus Neteler via RT <grass-bugs@intevation.de>
> Reply-To: Markus Neteler via RT <grass-bugs@intevation.de>
> Date: Wed,  2 Aug 2006 20:44:23 +0200 (CEST)
> To: <michael.barton@asu.edu>
> Subject: [bug #4604] (grass) Transaction (mneteler)
> 
> this bug's URL: http://intevation.de/rt/webrt?serial_num=4604
> 
> Wed, Aug 2 2006 20:44:23: Request 4604 was acted upon.
> 
>  Transaction: Mail sent by mneteler
>  
>        Queue: grass
>         Area: grass6
>      Subject: tcl/tk GUI: v.digit can't create new vector in GUI mode
>        Owner: mbarton
>   Requestors: epatton@nrcan.gc.ca
>       Status: open
> 
> -------------------------------------------------------------------------
> This was trivial to fix (seeing Glynn's last comment).
> 
> Strange that it didn't happen.
> 
> 
> 
> Fixed.
> 
> 
> 
> Markus
> 
> -------------------------------------------- Managed by Request Tracker


Wed, Aug 2 2006 22:36:13    Status changed to open by _rt_system  
Thu, Aug 3 2006 01:02:13    Mail sent by michael.barton@asu.edu  
Return-Path <michael.barton@asu.edu>
Delivered-To grass-bugs@lists.intevation.de
User-Agent Microsoft-Entourage/11.2.5.060620
Date Wed, 02 Aug 2006 16:03:07 -0700
Subject Re: [bug #4604] (grass) Transaction (_rt_system)
From Michael Barton <michael.barton@asu.edu>
To Paolo Cavallini via RT <grass-bugs@intevation.de>
Message-ID <C0F67D3B.232E3%michael.barton@asu.edu>
Thread-Topic [bug #4604] (grass) Transaction (_rt_system)
Thread-Index Aca2h9EBD11TUiJ7EduJMwAUUSYxwg==
In-Reply-To <20060802203613.990CA101F08@lists.intevation.de>
Mime-version 1.0
Content-type text/plain; charset="US-ASCII"
Content-transfer-encoding 7bit
X-Virus-Scanned by amavisd-new
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-2.603 tagged_above=-999 required=3 tests=[AWL=1.049, BAYES_00=-5, RCVD_NUMERIC_HELO=1.348]
X-Spam-Level
I changed this owner back to Nobody after hearing from Glynn. Apparently,
this bug is in the v.digit C code.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


> From: Request Tracker <grass-bugs@intevation.de>
> Reply-To: Request Tracker <grass-bugs@intevation.de>
> Date: Wed,  2 Aug 2006 22:36:13 +0200 (CEST)
> To: <michael.barton@asu.edu>
> Subject: [bug #4604] (grass) Transaction (_rt_system)
> 
> this bug's URL: http://intevation.de/rt/webrt?serial_num=4604
> 
> Wed, Aug 2 2006 22:36:13: Request 4604 was acted upon.
> 
>  Transaction: Status changed to open by _rt_system
>  
>        Queue: grass
>         Area: grass6
>      Subject: tcl/tk GUI: v.digit can't create new vector in GUI mode
>        Owner: mbarton
>   Requestors: epatton@nrcan.gc.ca
>       Status: open
> 
> -------------------------------------------------------------------------
> 
> 
> -------------------------------------------- Managed by Request Tracker


Thu, Aug 3 2006 10:26:39    Comments added by mneteler  
the real bug remains. 
 
v.digit is calling Tk_Main() as: 
 
    Tk_Main(argc, argv, Tcl_AppInit); 
 
where argc/argv are those passed to main. 
 
It shouldn't be doing this; it should be passing a dummy argv, e.g. 
 
    char *fake_argv[2]; 
 ... 
    fake_argv[0] = argv[0]; 
    fake_argv[1] = NULL; 
    Tk_Main(1, fake_argv, Tcl_AppInit); 
 
Changing the order of v.digit's arguments is a workaround, not a fix. 
 
> > Glynn also noted, however, that in the auto-generated GUI dialogs, this 
is 
> > being written as... 
> >  
> >   v.digit map=new_map -n 
> >  
> > This causes a problem because the -n is misinterpreted by TclTk as a 
flag in 
> > the TclTk command. So if the problem arises when v.digit is run from a 
menu 
> > or the dialog is started from the CLI by simply typing v.digit, then 
THIS is 
> > where the problem lies. 
> >  
> > Generically, the GRASS flags should come before any other arguments it 
> > seems. I don't know where this is coded, but Cedric should know. 
 
The generate_tcl() function in lib/gis/parser.c writes out a list of 
flags/options, with the flags last. gui.tcl passes the command-line 
options to the module in their original order, i.e. with the flags 
last. 
 
This isn't a problem, as G_parser() doesn't care about the order. The 
fact that putting the flags first happens to work around the bug in 
v.digit is a coincidence, but not a particularly relevant one: v.digit 
should still be fixed. 
 
-- Glynn Clements <glynn@gclements.plus.com>  
Fri, Aug 4 2006 18:10:41    Mail sent by msieczka  
Fixed by Markus.

Cheers,
Maciek
Fri, Aug 4 2006 18:10:47    Status changed to resolved by msieczka  
Comment | Reply | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request