comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » A problem with pickfile?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: A problem with pickfile? [message #6413 is a reply to message #6330] Thu, 13 June 1996 00:00 Go to previous message
amaravad is currently offline  amaravad
Messages: 11
Registered: September 1994
Junior Member
In article <31B4DEBE.2781@raptor.lpl.arizona.edu>,
Tim Patterson <tim@raptor.lpl.arizona.edu> wrote:
> Sorry to be generating my own thread here...
>
> Well, I managed to track down my problem, and it appears to be an
> inconsitency in the way pickfile works and I can't see this mentioned
> in the FAQ...
>
> If I call up pickfile as
>
> file = PICKFILE(GET_PATH = path)
>
> it creates a pickfile widget and I can select a file.
> The variable path is always returned correctly, but the
> variable file can vary dependent upon how I use the
> pickfile widget.
>
> If I click on an already existing file, the path+file names
> are copied into the selection widget and returned on pressing
> OK. So I end up with
>
> file = /usr/tim/file.dat
> and path = /usr/tim/
>
> However, if I type a filename into the Selection widget
> to create a new file and press OK, I get:
>
> file = newfile.dat
> and path = /usr/tim/
>
> Surely this inconsistency in pickfile is a bug of sorts.
> After all, there is no need to copy the path into the selection
> widget when it is available at the top of the pickfile widget
> already. The documentation says pickfile returns a file name
> and doesn't say it returns a complete path.
>
> I guess I'm going to have to add some OS-dependent code into
> my routines each time I call pickfile just to make sure
> that there is no path already attached to the filename unless
> somebody can tell me a clever hack around this...
>
> Tim

How about checking for '/' in the filename string. If you get
a -1 then you have only a filename w/o path. If not -1 then
pickfile has returned path+filename.

ratty
--
Ratnakar Amaravadi Software/Hardware Engineer
Department of Radiology I.U. School of Medicine
(317)274-1843 (w) amaravad@indiana.edu
(317)274-4074 (fax) ratty@foyt.indyrad.iupui.edu
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: overplot using polyfill
Next Topic: how to delete all variables in IDL?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 12:31:03 PDT 2025

Total time taken to generate the page: 1.60082 seconds