[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multiple filters
David Fanning wrote:
> I presume you are using a PC version of IDL, since a
> single file filter has been the only option there for
> some time. DIALOG_PICKFILE has been made marginally
> smarter in IDL 5.4, in that you can now specify a
> string array of file filters and it will recognize
> all of them.
Actually, I am using IDL on a Sun. We have a few different
versions of IDL due to the versions of Unix we have installed
around the place.
I was working in 5.1(I know, I know) to ensure compatibility on
all our systems when I first posted my query.
Strangely, I was reading the online help about dialog_pickfile in 5.4
and came across this:
"On UNIX, the FILTER keyword does not support specifying more
than one filter.
If you specify more than one filter, all files in the current
directory will be displayed.
For example, to display only files of type .jpg, .tif, or
.png in the file selection window, you could use the
file = DIALOG_PICKFILE(/READ, $
FILTER = ['*.jpg', '*.tif', '*.png'])..."
Sounds like some obscure alien talk to me - doesn't this sound
a little contradictory? First it says it won't work, and then it gives
an example of how it *would* work.Or perhaps the example is actually about
the paragraph much earlier - for Windows?
I tried it anyway, and what actually happens at the start
is that the files displayed use the first filter in the array.
After that(when you change directories), nothing gets displayed
- completely the opposite to what the help file says!
Curiouser and curiouser....
All that grumbling late last year on the newsgroup about reading
documentation...I guess it helps if the documentation is clear:)
Basic research is what I am doing when I don't know what I am doing.
Werner Von Braun (1912-1977) German rocket engineer
Department of Nuclear Medicine and Ultrasound
ph(02) 9845 7223