Re: DIALOG_PICKFILE Questions in IDL 6.1 [message #42155] |
Wed, 12 January 2005 08:02 |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
Jeff wrote:
> I just switch to IDL 6.1 from version 5.3. Now that the pick file
> dialog allows multiple filters I have a few questions.
>
> 1) with the directory kleyword set is there a way to force it to return
> the DOS compatible directory names? Or does anyone have a way of
> dealing with directory names that have spaces in them? I noticed that
> much like IDL 5.3, 6.1 does not like directories with spaces in the
> name.
>
Hi,
I have gotton into the habit of running any filename returned from
DIALOG_PICKFILE through FILE_SEARCH before using it. FILE_SEARCH has a keyword
for handling the 8.3 file naming convention.
> 2) is there a way to see what filter a user has selected? this is
> giving me problems when I use the dialog for writing, if I don't
> specify the extention when I create a new file it doesn't give the file
> an extention at all and won't write the file out.
>
That is a problem. Short of writing your own dialog routine, I don't see the
solution. One brute force work around is to force the user to select a filter
*before* entering the dialog. Something like these menu choices...
FILE >>> SAVE AS >>> [JPEG, PNG]
Where 'JPEG', 'PNG' are buttons bearing those names. Picking JPEG would pop the
dialog with FILTER = '*.jpg' ,/FIX_FILTER keywords. (Of course, if you are
writing images, take a look at DIALOG_WRTIE_IMAGE.)
Ben
|
|
|