Valeri,
Oops! my apologies! I did use gSystem->pwd() and it displayed the original
directory prior to the canvas's "save as". I should get into the habit of
cut/paste. Here's my interaction:
root [1] gSystem->pwd()
(const char* 0xb6a784)"c:\\analysis01"
root [2] .!cd
c:\analysis01
[ At this point I "Save As" the canvas to x:\test.c]
root [3] C++ Macro file: X:\test.C has been generated
root [3] gSystem->pwd()
(const char* 0xb6a784)"c:\\analysis01"
root [4] .!cd
X:\
This does not make sense!
Ed
> -----Original Message-----
> From: Faine, Valeri [mailto:fine@bnl.gov]
> Sent: Wednesday, May 07, 2003 3:16 PM
> To: 'Ed Oltman'; 'Roottalk@Pcroot. Cern. Ch'
> Subject: RE: [ROOT] "Save the selected Canvas/Pad as" --> changes
> default directory
>
>
>
>
> >
> > Hello,
> >
> > I am using win32 root v3.05/3 on win2k. When I save a canvas using
> that
> > window's "File->Save As" menu item, the root's (file system) directory
> > changes:
> >
> > .!cd displays the directory that the canvas was saved in
> >
> > however,
> >
> > gSystem->cd() displays the original directory prior to the Canvas's
> "Save
> > As"
> >
> > I suspect this is not the intended behavior (e.g. "Save As" changes
> the
> > default directory), but if it is, should'nt gSystem->cd() reflect this
> > change?
> >
>
> Hello Ed,
>
> To get the current working directory one should use the methods
>
> TSystem::pwd();
>
> What about cd() I found no method TSystem::cd() at all.
>
> There is TSystem::cd(const char *path).
> What you suggest means the method should return its own input parameter.
> That is not very useful. The method cd returns the replaced directory,
> i.e. one we have changed with the "path".
>
> Valeri
>
>
> Home
> It seems to me this is the "Correct" behavior of cd method:
>
> Bool_t cd(const char *path) { return ChangeDirectory(path); }
>
> Because TWinNTSystem::ChangeDirectoiry() return the previous directory
> There is no means to return the inout parameters.
>
> Rhe proper method to get the current working directory is
> TSystem::HomeDirectory()
> > Thanks,
> > Ed Oltman
> >
>
>
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET