Details Ticket 5220


Comment | Reply | Take | Resolve


Serial Number 5220
Subject wingrass: v.in.ogr (tcltk version) creates wrong directory path
Area grass6
Queue grass
Requestors mlennert@club.worldonline.be
Owner none
Status open
Last User Contact Thu Oct 19 21:30:57 2006 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Thu Oct 19 21:30:57 2006 (2 yr ago)
Created Thu Oct 19 11:48:10 2006 (2 yr ago)

Transaction History Ticket 5220


Thu, Oct 19 2006 11:48:10    Request created by guest  
Subject: wingrass: v.in.ogr (tcltk version) creates wrong directory path

Platform: WindowsNT/2000/XP
grass obtained from: Other (CDROM etc)
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: huidae's wingrass version sept. 17c

Directory paths created by the tcktk dialogs (navigate to find file buttons)
do not work in wingrass. They are created in the form c:/moritz, but in order
for them to be recognized, they should be in the form /c/moritz.

Moritz
Thu, Oct 19 2006 17:20:02    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 Thu, 19 Oct 2006 08:19:49 -0700
Subject Re: [GRASS-dev] [bug #5220] (grass) wingrass: v.in.ogr (tcltk version) creates wrong directory path
From Michael Barton <michael.barton@asu.edu>
To Paolo Cavallini via RT <grass-bugs@intevation.de>, <grass-dev@grass.itc.it>
Message-ID <C15CE5A5.FE4A%michael.barton@asu.edu>
Thread-Topic [GRASS-dev] [bug #5220] (grass) wingrass: v.in.ogr (tcltk version) creates wrong directory path
Thread-Index AcbzkgRTQs+gml+FEduYjwAKlXAweg==
In-Reply-To <20061019094810.C72D51006A6@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=-3.752 tagged_above=-999 required=3 tests=[BAYES_00=-5, RCVD_NUMERIC_HELO=1.248]
X-Spam-Level
The tcltk file browser is a prebuilt widget. The Windows version apparently
returns files in proper Windows format. If all file parsing for windows
platforms should switch from c:/ to /c/, this could be parsed in an if
clause to test for windows platform. Is this kind of reparsing needed
universally for windows or just in some places? It would take some effort to
track down and change in the appropriate places (most importantly in
gui.tcl), but it is doable.

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: Request Tracker <grass-bugs@intevation.de>
> Reply-To: Request Tracker <grass-bugs@intevation.de>
> Date: Thu, 19 Oct 2006 11:48:10 +0200 (CEST)
> To: <grass-dev@grass.itc.it>
> Subject: [GRASS-dev] [bug #5220] (grass) wingrass: v.in.ogr (tcltk version)
> creates wrong directory path
> 
> this bug's URL: http://intevation.de/rt/webrt?serial_num=5220
> -------------------------------------------------------------------------
> 
> Subject: wingrass: v.in.ogr (tcltk version) creates wrong directory path
> 
> Platform: WindowsNT/2000/XP
> grass obtained from: Other (CDROM etc)
> grass binary for platform: Downloaded precompiled Binaries
> GRASS Version: huidae's wingrass version sept. 17c
> 
> Directory paths created by the tcktk dialogs (navigate to find file buttons)
> do not work in wingrass. They are created in the form c:/moritz, but in order
> for them to be recognized, they should be in the form /c/moritz.
> 
> Moritz
> 
> -------------------------------------------- Managed by Request Tracker
> 
> 


Thu, Oct 19 2006 17:32:42    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <45379AB3.0@club.worldonline.be>
Date Thu, 19 Oct 2006 17:33:07 +0200
From Moritz Lennert <mlennert@club.worldonline.be>
User-Agent Thunderbird 1.5.0.7 (X11/20060927)
MIME-Version 1.0
To Michael Barton via RT <grass-bugs@intevation.de>
Cc Grass Developers List <grass-dev@grass.itc.it>, Huidae Cho <grass4u@gmail.com>, Glynn Clements <glynn@gclements.plus.com>
Subject Re: [bug #5220] (grass) wingrass: v.in.ogr (tcltk
References <20061019152003.023D61006C6@lists.intevation.de>
In-Reply-To <20061019152003.023D61006C6@lists.intevation.de>
Content-Type text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-5 tagged_above=-999 required=3 tests=[BAYES_00=-5]
X-Spam-Level
Michael Barton via RT wrote:
> The tcltk file browser is a prebuilt widget. The Windows version apparently
> returns files in proper Windows format. If all file parsing for windows
> platforms should switch from c:/ to /c/, this could be parsed in an if
> clause to test for windows platform. Is this kind of reparsing needed
> universally for windows or just in some places? It would take some effort to
> track down and change in the appropriate places (most importantly in
> gui.tcl), but it is doable.

For what I have seen, it is necessary for all of wingrass, but I don't 
know the internals sufficiently.

CC'ing the experts...

Moritz

> 
> 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: Request Tracker <grass-bugs@intevation.de>
>> Reply-To: Request Tracker <grass-bugs@intevation.de>
>> Date: Thu, 19 Oct 2006 11:48:10 +0200 (CEST)
>> To: <grass-dev@grass.itc.it>
>> Subject: [GRASS-dev] [bug #5220] (grass) wingrass: v.in.ogr (tcltk version)
>> creates wrong directory path
>>
>> this bug's URL: http://intevation.de/rt/webrt?serial_num=5220
>> -------------------------------------------------------------------------
>>
>> Subject: wingrass: v.in.ogr (tcltk version) creates wrong directory path
>>
>> Platform: WindowsNT/2000/XP
>> grass obtained from: Other (CDROM etc)
>> grass binary for platform: Downloaded precompiled Binaries
>> GRASS Version: huidae's wingrass version sept. 17c
>>
>> Directory paths created by the tcktk dialogs (navigate to find file buttons)
>> do not work in wingrass. They are created in the form c:/moritz, but in order
>> for them to be recognized, they should be in the form /c/moritz.
>>
>> Moritz
>>
>> -------------------------------------------- Managed by Request Tracker
>>
>>
> 
> 
> --- Headers Follow ---
> 
>>From michael.barton@asu.edu  Thu Oct 19 17:20:02 2006
> Return-Path: <michael.barton@asu.edu>
> Delivered-To: grass-bugs@lists.intevation.de
> Received: from kolab.intevation.de (aktaia [212.95.126.10])
> 	by lists.intevation.de (Postfix) with ESMTP id D02F51006C5
> 	for <grass-bugs@lists.intevation.de>; Thu, 19 Oct 2006 17:20:02 +0200 (CEST)
> Received: from localhost (localhost.localdomain [127.0.0.1])
> 	by kolab.intevation.de (Postfix) with ESMTP id C240019D3BE
> 	for <grass-bugs@lists.intevation.de>; Thu, 19 Oct 2006 17:20:02 +0200 (CEST)
> Received: from localhost (localhost.localdomain [127.0.0.1])
> 	by kolab.intevation.de (Postfix) with ESMTP id 98E991998ED
> 	for <grass-bugs@lists.intevation.de>; Thu, 19 Oct 2006 17:20:02 +0200 (CEST)
> Received: from epo-int1.asu.edu (epo-int1.asu.edu [129.219.187.20])
> 	by kolab.intevation.de (Postfix) with ESMTP id EA56E191E9C
> 	for <grass-bugs@intevation.de>; Thu, 19 Oct 2006 17:19:53 +0200 (CEST)
> Received: from EX03.asurite.ad.asu.edu (excl1-a0.asurite.ad.asu.edu [129.219.12.199])
> 	by epo-int1.asu.edu (Switch-3.1.8/Switch-3.1.7/asu-postoffice-prod) with ESMTP
id k9JFJo6o032106;
> 	Thu, 19 Oct 2006 08:19:50 -0700
> Received: from 216.160.195.212 ([216.160.195.212]) by EX03.asurite.ad.asu.edu
([129.219.12.223]) via Exchange Front-End Server exchange.asu.edu ([129.219.10.232])
with Microsoft Exchange Server HTTP-DAV ;
>  Thu, 19 Oct 2006 15:19:50 +0000
> User-Agent: Microsoft-Entourage/11.2.5.060620
> Date: Thu, 19 Oct 2006 08:19:49 -0700
> Subject: Re: [GRASS-dev] [bug #5220] (grass) wingrass: v.in.ogr (tcltk
>  version) creates wrong directory path
> From: Michael Barton <michael.barton@asu.edu>
> To: Paolo Cavallini via RT <grass-bugs@intevation.de>,
> 	<grass-dev@grass.itc.it>
> Message-ID: <C15CE5A5.FE4A%michael.barton@asu.edu>
> Thread-Topic: [GRASS-dev] [bug #5220] (grass) wingrass: v.in.ogr (tcltk
>  version) creates wrong directory path
> Thread-Index: AcbzkgRTQs+gml+FEduYjwAKlXAweg==
> In-Reply-To: <20061019094810.C72D51006A6@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=-3.752 tagged_above=-999 required=3
>  tests=[BAYES_00=-5, RCVD_NUMERIC_HELO=1.248]
> X-Spam-Level: 
> 
> -------------------------------------------- Managed by Request Tracker


Thu, Oct 19 2006 20:21:57    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 <17719.49730.780803.921698@cerise.gclements.plus.com>
Date Thu, 19 Oct 2006 19:21:54 +0100
To Request Tracker <grass-bugs@intevation.de>
Cc grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #5220] (grass) wingrass: v.in.ogr (tcltk version) creates wrong directory path
In-Reply-To <20061019094810.C72D51006A6@lists.intevation.de>
References <20061019094810.C72D51006A6@lists.intevation.de>
X-Mailer VM 7.07 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-5 tagged_above=-999 required=3 tests=[BAYES_00=-5]
X-Spam-Level
Request Tracker wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=5220
> -------------------------------------------------------------------------
> 
> Subject: wingrass: v.in.ogr (tcltk version) creates wrong directory path
> 
> Platform: WindowsNT/2000/XP
> grass obtained from: Other (CDROM etc)
> grass binary for platform: Downloaded precompiled Binaries
> GRASS Version: huidae's wingrass version sept. 17c
> 
> Directory paths created by the tcktk dialogs (navigate to find file
> buttons) do not work in wingrass. They are created in the form
> c:/moritz, but in order for them to be recognized, they should be in
> the form /c/moritz.

That depends upon the Tcl/Tk implementation. For a native Windows
Tcl/Tk implementation, you would have to use c:\moritz. The /c/moritz
syntax is part of MinGW/Cygwin; it isn't valid within Windows itself.

Michael Barton wrote:

> The tcltk file browser is a prebuilt widget. The Windows version apparently
> returns files in proper Windows format. If all file parsing for windows
> platforms should switch from c:/ to /c/, this could be parsed in an if
> clause to test for windows platform. Is this kind of reparsing needed
> universally for windows or just in some places? It would take some effort to
> track down and change in the appropriate places (most importantly in
> gui.tcl), but it is doable.

Probably the safest solution is to use Tcl's "file" command to manage
filenames, rather than trying to do it manually using string
operations. The following sub-commands appear relevant.

       file dirname name
       file extension name
       file join name ?name ...?
       file nativename name
       file normalize name
       file pathtype name
       file rootname name
       file separator ?name?
       file split name
       file tail name
       file volumes

Notes:

1. While most Windows API calls accept both '\' and '/', most
console-mode commands only accept '\', as '/' is used for switches
(which needn't be preceded by a space; "dir foo/w" is equivalent to
"dir foo /w" or "dir /w foo"). You probably need to use
"file nativename" for any filenames passed to Tcl's "exec" command.

2. Don't forget about UNC paths: \\server\share\path\to\file.txt

3. There is some additional information in the filename(n) manpage.

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


Thu, Oct 19 2006 21:30:57    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 Thu, 19 Oct 2006 12:30:35 -0700
Subject Re: [GRASS-dev] [bug #5220] (grass) wingrass: v.in.ogr (tcltk version) creates wrong directory path
From Michael Barton <michael.barton@asu.edu>
To Glynn Clements <glynn@gclements.plus.com>, Paolo Cavallini via RT <grass-bugs@intevation.de>
Cc <grass-dev@grass.itc.it>
Message-ID <C15D206B.25AC3%michael.barton@asu.edu>
Thread-Topic [GRASS-dev] [bug #5220] (grass) wingrass: v.in.ogr (tcltk version) creates wrong directory path
Thread-Index AcbztQxwSvbrA1+oEdu78gAUUSYxwg==
In-Reply-To <17719.49730.780803.921698@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.752 tagged_above=-999 required=3 tests=[BAYES_00=-5, RCVD_NUMERIC_HELO=1.248]
X-Spam-Level
Thanks Glynn,

This is a good way to parse these. However, if we will have to reassemble
the pieces in a 'nonstandard', it may still require a string function
somewhere (e.g., file join will create a 'proper' path for the platform in
question). What I'm not sure of and hope someone can check is whether you
need to use this format for both reading and writing, in all modules, and
how you specify a server (does \\server\share\path\to\file.txt work?) in
this environment. 

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: Glynn Clements <glynn@gclements.plus.com>
> Date: Thu, 19 Oct 2006 19:21:54 +0100
> To: Request Tracker <grass-bugs@intevation.de>
> Cc: <grass-dev@grass.itc.it>
> Subject: Re: [GRASS-dev] [bug #5220] (grass) wingrass: v.in.ogr (tcltk
> version) creates wrong directory path
> 
> 
> Request Tracker wrote:
> 
>> this bug's URL: http://intevation.de/rt/webrt?serial_num=5220
>> -------------------------------------------------------------------------
>> 
>> Subject: wingrass: v.in.ogr (tcltk version) creates wrong directory path
>> 
>> Platform: WindowsNT/2000/XP
>> grass obtained from: Other (CDROM etc)
>> grass binary for platform: Downloaded precompiled Binaries
>> GRASS Version: huidae's wingrass version sept. 17c
>> 
>> Directory paths created by the tcktk dialogs (navigate to find file
>> buttons) do not work in wingrass. They are created in the form
>> c:/moritz, but in order for them to be recognized, they should be in
>> the form /c/moritz.
> 
> That depends upon the Tcl/Tk implementation. For a native Windows
> Tcl/Tk implementation, you would have to use c:\moritz. The /c/moritz
> syntax is part of MinGW/Cygwin; it isn't valid within Windows itself.
> 
> Michael Barton wrote:
> 
>> The tcltk file browser is a prebuilt widget. The Windows version apparently
>> returns files in proper Windows format. If all file parsing for windows
>> platforms should switch from c:/ to /c/, this could be parsed in an if
>> clause to test for windows platform. Is this kind of reparsing needed
>> universally for windows or just in some places? It would take some effort
to
>> track down and change in the appropriate places (most importantly in
>> gui.tcl), but it is doable.
> 
> Probably the safest solution is to use Tcl's "file" command to manage
> filenames, rather than trying to do it manually using string
> operations. The following sub-commands appear relevant.
> 
>        file dirname name
>        file extension name
>        file join name ?name ...?
>        file nativename name
>        file normalize name
>        file pathtype name
>        file rootname name
>        file separator ?name?
>        file split name
>        file tail name
>        file volumes
> 
> Notes:
> 
> 1. While most Windows API calls accept both '\' and '/', most
> console-mode commands only accept '\', as '/' is used for switches
> (which needn't be preceded by a space; "dir foo/w" is equivalent to
> "dir foo /w" or "dir /w foo"). You probably need to use
> "file nativename" for any filenames passed to Tcl's "exec" command.
> 
> 2. Don't forget about UNC paths: \\server\share\path\to\file.txt
> 
> 3. There is some additional information in the filename(n) manpage.
> 
> -- 
> Glynn Clements <glynn@gclements.plus.com>
> 
> 


Comment | Reply | Take | Resolve

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