> One question: > How can I get the information about the path of the layer?
mhm.. I think Larry used this in his layer properties plugin. let me look: could be these lines: ***** Object fnameObj = dsq.getDataSource().getProperties().get("File"); if (fnameObj != null){ sourcePath = fnameObj.toString(); } ***** stefan > > One little remark: > If the layer is empty and I use > "Save Selected Datasets" no warning or errormessage appears > in the Output Window or in the message field (yellow). > > > > Thank you for your patience and your help! > > Regards > > Uwe > > Larry Becker schrieb: >> Hi Uwe, >> >> Your explanation makes sense in the context you present it. What >> isn't clear to me is why "Save Selected Datasets" isn't being used to >> save the changes. The only reason to use the "Save Dataset As" command >> is when you wish to make a new copy of the layer. >> >> regards, >> Larry >> >> On Wed, May 28, 2008 at 1:26 AM, Uwe Dalluege >> <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: >> >> Hi Larry, hi Landon, >> >> please let me explain this problem from the >> user-side, so maybe it would be clear what I mean :-) >> >> 1. I have a new project with two layer. >> >> 2. Then I save the first layer to directory A and >> the second layer to directory B. >> >> 3. After that I save the project and open the project again. >> OpenJUMP loads the first layer from directory A and the second >> layer from directory B. >> Everything is fine :-) >> So I think ( as a user ) OpenJUMP knows where to find the layer. >> >> But... >> When I save with Save Datset As... the first layer to directory A >> and the second layer to directory B and I try to save the first >> layer again >> the default path is directory B! >> From the user-side it is not clear why OpenJUMP could not remember >> where the layer was saved. >> From the user side it would be nice when I save layer A and layer B >> to differend directories that Save Dataset As... knows where to save >> the layer. >> >> From the programmer side I think, there must be an attribute for >> each layer with the path of the layer. >> The Save Project knows the path of each layer because >> in the project files there is the right path! >> I don't know how OpenJUMP stores the path of each layer but >> the information is there. Maybe it is possible >> that Save Dataset As... can use this information??? >> >> Best regards >> >> Uwe >> >> >> Mit freundlichen Gruessen >> >> Uwe Dalluege >> >> >> -------------------------------------------------------------------------- >> HafenCity Universitaet Hamburg >> Department Geomatik >> Rechenzentrum >> Dipl.-Ing. Uwe Dalluege :-) >> Hebebrandstr. 1 >> 22297 Hamburg >> Tel.: +49 40 42827 - 5335 oder 5353 oder 5313 >> Fax: +49 40 42827 - 5409 >> E-Mail: mailto:[EMAIL PROTECTED] >> <mailto:[EMAIL PROTECTED]> >> Url: http://www.hcu-hamburg.de/geomatik/ >> >> -------------------------------------------------------------------------- >> >> >> Larry Becker schrieb: >> >> Hi Uwe, >> >> It is certainly possible to synchronize the default directory >> for the project and the Save Dataset As, however it is likely >> that unintended consequences will result. Consider that if we >> do make a single default path, opening another project will >> reset the Save As Path for both Projects to be that of the newly >> opened project. This could easily cause the same problem you >> mentioned. >> >> My internal users complain about this issue frequently, but it >> is a case of damned-if-you-do and damned-if-you-don't since what >> they really want is for the program to always default to the >> directory they are thinking of. >> >> It is really a case of what you consider to be the "best >> practices" of file management. For instance, I like to keep all >> of my project files in the same directory, and use subfolders >> for the dataset files. Having a single default path would make >> this cumbersome. >> >> I agree that the potential for error in saving files to the >> wrong directory is serious and very real. I just don't know a >> solution that won't just change where the problem occurs. >> Perhaps someone else has an idea. >> >> best regards, >> Larry >> >> >> >> >> On Tue, May 27, 2008 at 4:03 AM, Uwe Dalluege >> <[EMAIL PROTECTED] >> <mailto:[EMAIL PROTECTED]> >> <mailto:[EMAIL PROTECTED] >> <mailto:[EMAIL PROTECTED]>>> wrote: >> >> Hi, >> >> there is a source of error with Save Dataset As... >> and Save Selected Datasets: >> >> 1. Open a project with two layer >> (the .jml files are in the project-directory). >> >> 2. Save Project As... >> The default path is the project-directory. >> That is good! :-) >> >> 3. Try to save the first layer with Save Dataset As... >> The default path is *not* the path where the >> .jml file is lying. :-( >> >> 4. Now save the first layer with Save Dataset As... >> to the project-directory. >> >> 5. Now save the *other* layer with Save Dataset As... >> The default path is now the directory path! >> >> >> This is a source of error because >> if the user do Save Selected Datasets >> the layer is saved in the wrong directory!!! :-( >> >> Is it possible to set the layer-path >> to the known path in the project-file >> so you can use Save Selected Datasets >> without problems? >> >> If this is possible please can you change it >> in the OpenJUMP version 1.2F? >> >> Thank you for help. >> >> Best regards >> >> Uwe >> >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net> >> <mailto:Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net>> >> >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> >> >> >> -- >> http://amusingprogrammer.blogspot.com/ >> >> >> >> >> -- >> http://amusingprogrammer.blogspot.com/ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel