MapTools.org

[maplab-users] functions adding incorrect paths/filenames when adding/changing data

Paul Spencer spencer@dmsolutions.ca
Thu, 27 Mar 2003 16:01:43 -0500
Matt,

 > First, is this the right place to post bugs in MapLab?  If not, I won't
 > trouble the rest of you who seem to not have any problems at all with
 > this program....is it me or what?

this is the correct forum to discuss bugs, issues, etc with MapLab.  I 
would hesitate to say it's just you ;)

> Now to the bug:
> Whenever I use the "selectFile" or "selectDirectory" buttons (these are
> actually javascript functions) to choose a file or directory, the
> returned value is (almost) always either an incorrect filename or path.
> For example
> 
> 1. when I click the button to select the FontSet file in the MAP object,
> in the file select window I navigate to  tutorial/etc and click on
> fonts.txt and click OK. I get the following result in the properties
> window:
> 
> ../../../../../../../../../..//tutorial/etc/fonts.txt

looks pretty wrong :)  We'll look into this.

> 2. In the tutorial, there's an example to add the bathymetry layer. So
> in the Layer object, Data property, clicking on the selectFile button,
> select Files of Type=all files, select bath_mapserver.tif, click Open
> returns the following filename:
> 
> ./bath_mapserver
> 
> which will fail because it does not include the .tif suffix (why was it
> dropped? Don't know...must be a bug!). 

yes and no.  The File Selector was originally built to open shapefiles 
and the correct way to handle shapefiles is to specify the name without 
the .shp on the end.  We recently added the file type filter so that 
people could get at more file types.  We'll have to add an explicit 
check for .shp and remove the extension only in that case.  Thanks for 
finding this.

Cheers,

Paul

PS: did you get the preview problem fixed yet?






This archive was generated by Pipermail.