file selection widget and returning filters [message #42454] |
Thu, 10 February 2005 07:06  |
Rob Dimeo
Messages: 17 Registered: November 1999
|
Junior Member |
|
|
Hi,
I'm hoping that the answer is not to "roll your own" but (and here
comes a big run-on sentence)....does anyone know of a file selection
utility much like DIALOG_PICKFILE that allows the program user to
specify a filter and then, if the user changes the filter, *remember*
the new one (so that subsequent file selections start with the new
filter)? FSC_FILESELECT offers the flexibility of obtaining this info
from an object reference but it doesn't list the files that match the
filter like DIALOG_PICKFILE. Nor does CW_FILESEL seem to allow the
user to change the filter at runtime.
Thanks in advance,
Rob
P.S. By the way I can't even get CW_FILESEL to limit the number of
files displayed by by setting the FILTER keyword to a string array
other than "All Files" but that's another story...another posting...
|
|
|
Re: file selection widget and returning filters [message #42580 is a reply to message #42454] |
Tue, 15 February 2005 08:01  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Rob wrote:
> Paul,
>
> You're right, most of the functionality is similar to DIALOG_PICKFILE.
> But I wanted a bit more flexibility from that dialog which, since it is
> a native widget, I could not modify. The difference really is in the
> API for this modal widget function: the addition of the FILTER_IN and
> FILTER_OUT keywords (added this morning). I also added a REVERSE ORDER
> checkbox that gives the user the option to view the files in reverse
> alphabetical order.
Sweet - I like that too.
> This is useful at our facility where our users
> will try to sift through hundreds of files in a single directory and
> the only ones that they really want are the latest ones...i.e the last
> data files in the directory listing. This was an attempt at providing
> that functionality.
>
> See the same web site as I listed before for latest source code and
> screen shot.
>
> Thanks for the words of encouragement, Paul.
Thanks for the code!
paulv
--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
|
|
|
Re: file selection widget and returning filters [message #42581 is a reply to message #42454] |
Tue, 15 February 2005 07:48  |
Rob Dimeo
Messages: 17 Registered: November 1999
|
Junior Member |
|
|
Paul,
You're right, most of the functionality is similar to DIALOG_PICKFILE.
But I wanted a bit more flexibility from that dialog which, since it is
a native widget, I could not modify. The difference really is in the
API for this modal widget function: the addition of the FILTER_IN and
FILTER_OUT keywords (added this morning). I also added a REVERSE ORDER
checkbox that gives the user the option to view the files in reverse
alphabetical order. This is useful at our facility where our users
will try to sift through hundreds of files in a single directory and
the only ones that they really want are the latest ones...i.e the last
data files in the directory listing. This was an attempt at providing
that functionality.
See the same web site as I listed before for latest source code and
screen shot.
Thanks for the words of encouragement, Paul.
Rob
|
|
|
Re: file selection widget and returning filters [message #42582 is a reply to message #42454] |
Tue, 15 February 2005 07:18  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Rob Dimeo wrote:
> Dear Paul and Craig,
>
> Actually that *is* the behavior that I intended even though it may not
> be obvious why. Each time I launched the dialog I did not want to load
> in the contents of the entire directory hierarchy (in the interest of
> speed). I only wanted to display the contents of the current directory
> (subdirectories + files).
Oh, fair enough. But, then, how is the functionality of this pickfile different from
DIALOG_PICKFILE() ? In the latter, the same info is displayed -- subdirectories + files
-- albeit in different "windows" of the widget. (The question is really just for
argument's sake since I much prefer the look of yours even if the functionality is similar).
> Each time you double click on a subdirectory
> then you go into it and the tree widget contents are updated to show
> that directory's files and subdirectories. The "root" folder behaves
> slightly differently in that if you double-click on it, you go up one
> directory. Note that the +/- only expands or compresses the view of
> the contents of the current directory. I probably could have done this
> so that it was more intuitive (I'm certainly open to ideas :) )
If only the +/- of the current directory is "active", then is it possible to make the
subdirectory +/-'s not show up? By having those little icons there, one expects them to do
something.
But, regardless, I'm going to create a RMD subdirectory in my user_contrib for your
pickfile. Like I said above, I like the look of it much more than the regular pickfile().
Your RMD_PICKFILE is more user friendly (IMO) by having all the clickable info in one
widget window.
Good one.
paulv
--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
|
|
|
Re: file selection widget and returning filters [message #42589 is a reply to message #42454] |
Mon, 14 February 2005 17:24  |
Rob[1]
Messages: 5 Registered: January 2005
|
Junior Member |
|
|
Dear Paul and Craig,
Actually that *is* the behavior that I intended even though it may not
be obvious why. Each time I launched the dialog I did not want to load
in the contents of the entire directory hierarchy (in the interest of
speed). I only wanted to display the contents of the current directory
(subdirectories + files). Each time you double click on a subdirectory
then you go into it and the tree widget contents are updated to show
that directory's files and subdirectories. The "root" folder behaves
slightly differently in that if you double-click on it, you go up one
directory. Note that the +/- only expands or compresses the view of
the contents of the current directory. I probably could have done this
so that it was more intuitive (I'm certainly open to ideas :) )
Thanks for the feedback.
Rob
P.S. Craig, sorry for the gratuitous use of IDL 6 syntax.
Craig Markwardt wrote:
> Paul Van Delst <paul.vandelst@noaa.gov> writes:
>
>
>> Rob wrote:
>>> For those who are interested, I wrote a file selection utility
that
>>> uses tree widgets that does what I specified in my original
posting.
>>> In particular it allows you to specify a file type filter with an
input
>>> keyword and, if the user changes the filter while the dialog is
>>> displayed, an output keyword will return the updated filter.
>>
>> Very cool.
>>
>> I downloaded it and tried it on my linux box:
>>
>> IDL> print, !version
>> { x86 linux unix linux 6.0.3 Feb 26 2004 32 64}
>>
>> and I note that the little "+/-" icons next to directories don't
>> work. That is, the only way I can look at the contents of a
>> subdirectory is enter it via a double-click. The little
manila-folder
>> subdirectory icons do open and close when I single-click the "+/-"
>> bitties, but there is no display of files. (Does this explanation
even make sense?)
>
> Yep, I get the same thing on
> { x86 linux unix linux 6.1 Jul 14 2004 32 64}
>
> And I give it a slight ding for gratuitous use of IDL 6 syntax. :-)
> Otherwise it works in IDL 5.6. And it's pretty darn cool!
>
> Craig
>
> --
>
------------------------------------------------------------ --------------
> Craig B. Markwardt, Ph.D. EMAIL:
craigmnet@REMOVEcow.physics.wisc.edu
> Astrophysics, IDL, Finance, Derivatives | Remove "net" for better
response
>
------------------------------------------------------------ --------------
|
|
|
Re: file selection widget and returning filters [message #42593 is a reply to message #42454] |
Mon, 14 February 2005 15:38  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Paul Van Delst <paul.vandelst@noaa.gov> writes:
> Rob wrote:
>> For those who are interested, I wrote a file selection utility that
>> uses tree widgets that does what I specified in my original posting.
>> In particular it allows you to specify a file type filter with an input
>> keyword and, if the user changes the filter while the dialog is
>> displayed, an output keyword will return the updated filter.
>
> Very cool.
>
> I downloaded it and tried it on my linux box:
>
> IDL> print, !version
> { x86 linux unix linux 6.0.3 Feb 26 2004 32 64}
>
> and I note that the little "+/-" icons next to directories don't
> work. That is, the only way I can look at the contents of a
> subdirectory is enter it via a double-click. The little manila-folder
> subdirectory icons do open and close when I single-click the "+/-"
> bitties, but there is no display of files. (Does this explanation even make sense?)
Yep, I get the same thing on
{ x86 linux unix linux 6.1 Jul 14 2004 32 64}
And I give it a slight ding for gratuitous use of IDL 6 syntax. :-)
Otherwise it works in IDL 5.6. And it's pretty darn cool!
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
Re: file selection widget and returning filters [message #42594 is a reply to message #42454] |
Mon, 14 February 2005 14:59  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Rob wrote:
> For those who are interested, I wrote a file selection utility that
> uses tree widgets that does what I specified in my original posting.
> In particular it allows you to specify a file type filter with an input
> keyword and, if the user changes the filter while the dialog is
> displayed, an output keyword will return the updated filter.
Very cool.
I downloaded it and tried it on my linux box:
IDL> print, !version
{ x86 linux unix linux 6.0.3 Feb 26 2004 32 64}
and I note that the little "+/-" icons next to directories don't work. That is, the only
way I can look at the contents of a subdirectory is enter it via a double-click. The
little manila-folder subdirectory icons do open and close when I single-click the "+/-"
bitties, but there is no display of files. (Does this explanation even make sense?)
I dunno if it's a unix/windows thing.
paulv
--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
|
|
|