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

Home » Public Forums » archive » dialog_pickfile problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
dialog_pickfile problem [message #10235] Wed, 05 November 1997 00:00 Go to next message
Kevin Marvel is currently offline  Kevin Marvel
Messages: 3
Registered: July 1997
Junior Member
I am having a problem with the dialog_pickfile widget. I am running IDL

on a Sun Ultra 1 running Solaris OS (latest version). The problem is
that
dialog_pickfile displays the fully expanded directory path for all
directories
and all files in the directory and file panes (respectively). This is
redundant
information as the filter line above has the full path. Does anyone
know how
to stop dialog_pickfile from displaying the fully qualified paths?

Kev.


--

+----------------------------------------------------------- ------------+
| Kevin B. Marvel, Ph.D. Phone: (619) 938-2075, ext. 204 |
| Owens Valley Radio Observatory Fax: (619) 938-2297 |
| 100 Leighton Lane e-mail: kbm@ovro.caltech.edu |
| Big Pine, CA 93513 WWW: http://www.ovro.caltech.edu/~kbm/index.html |
+----------------------------------------------------------- ------------+
Re: dialog_pickfile problem [message #10903 is a reply to message #10235] Thu, 05 February 1998 00:00 Go to previous messageGo to next message
ressler is currently offline  ressler
Messages: 2
Registered: February 1998
Junior Member
On Wed, 4 Feb 1998 16:33:56 GMT, bowler@eisner.decus.org wrote:
> Is there a way to change the behaviour of dialog_pickfile so that the "file"
> side of the dialog box only shows the name part of the filename, rather then
> the whole path? The way it exists now, if you're more than about 1 level
> deep in the directory structure, you can't see what filename you're selecting.

Though you don't say it, I'm guessing you are using Solaris 2.5.1. There
is a bug in one of the X libraries - libXm, I believe, which causes this
behavior - it's not a problem native to IDL. Applying Sun's patch
#103461-15 will fix it. Or you can do like I ultimately did and dump
OpenWindows entirely and replace it with a stock X11R6.3 :-)

Mike Ressler
ressler@cougar.jpl.nasa.gov
Re: dialog_pickfile problem [message #51053 is a reply to message #10235] Fri, 03 November 2006 08:17 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Eric Hudson writes:

> I use several programs that have this type of functionality, although
> not in a standard file dialog. Instead, the file dialog is extended to
> include a "selected files" list (for example, in a region below the
> standard dialog). The "OK" of the file dialog is now "Select" and
> selected files are added to the list. Some basic functionality of
> ordering and removing items from the list rounds out what I think would
> be a generically useful tool.

Yes, this is the only way I can see to implement this
kind of functionality. Unfortunately, it means developing
your own machine-independent file selection tool. (Or,
using CW_FILESEL, which is easily ruled out on aesthetics
alone!) I've long wished for a way to include the standard
file selection widgets inside my own widget base, which
would make such a thing easy to write. But I don't think
we are going to see anything like that.

Cheers,

David

P.S. Have you ever wondered why Dialog_Pickfile always
appears in the upper-left corner of the display when
you first use it, and then in the center of the display
from then on? That's the kind of thing that drives me
crazy. -(

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: dialog_pickfile problem [message #51055 is a reply to message #10235] Fri, 03 November 2006 08:00 Go to previous messageGo to next message
Eric Hudson is currently offline  Eric Hudson
Messages: 19
Registered: June 2006
Junior Member
David Fanning wrote:
> Nagur writes:
>
>> I have a problem with dialog_pickfile. It doesnt allow me to select
>> multiple_files across different subdirectories. Is there a way that
>> will allow me to select multiple_files but from different directories?
>
> Do you have *any* file selection tool on your operating
> system that allows you to do this? I don't believe I've
> ever seen one.
>

I use several programs that have this type of functionality, although
not in a standard file dialog. Instead, the file dialog is extended to
include a "selected files" list (for example, in a region below the
standard dialog). The "OK" of the file dialog is now "Select" and
selected files are added to the list. Some basic functionality of
ordering and removing items from the list rounds out what I think would
be a generically useful tool.
Re: dialog_pickfile problem [message #51057 is a reply to message #10235] Fri, 03 November 2006 07:29 Go to previous messageGo to next message
Jo Klein is currently offline  Jo Klein
Messages: 54
Registered: January 2006
Member
I've seen something like that running in Matlab, and it's a bit of a
nightmare. The problem is keeping track of what you've actually selected
in a directory that you are currently not in. It's not a machine
limitation, I suppose it's just good reasoning given the average
person's, say, Friday afternoon attention span ...
Cheers,
Jo

Nagur wrote:
> Thanks David for the reply.........But do you know why we do not have
> such a tool(dialog_pickfile with the capability to select multiple
> files across different directories)? ....I am curious to know if there
> is any technical reason.....
>
> best wishes,
> Nagur
>
Re: dialog_pickfile problem [message #51063 is a reply to message #10235] Thu, 02 November 2006 16:46 Go to previous messageGo to next message
Robbie is currently offline  Robbie
Messages: 165
Registered: February 2006
Senior Member
The only reasonable way I could think to do this would be to have a
temporary widget_tree which had a heirarchy of all currently selected
directories or files. You would use dialog_pickfile to add files to
that heirarchy.

Alternatively you could use dialog_pickfile to select a root for a
temporary widget_tree. The tree would be built using file_search and
then the user could flag the tree nodes for selection.

It all depends upon the context of the application. I agree that you're
expecting a bit much from dialog_pickfile.

Robbie

http://www.barnett.id.au/idl
Re: dialog_pickfile problem [message #51064 is a reply to message #10235] Thu, 02 November 2006 16:45 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nagur writes:

> Thanks David for the reply.........But do you know why we do not have
> such a tool(dialog_pickfile with the capability to select multiple
> files across different directories)? ....I am curious to know if there
> is any technical reason.....

My guess is because such a thing doesn't exist
in the underlying operating system routines
to support it. But I don't know. Have you
ever seen this kind of functionality?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: dialog_pickfile problem [message #51065 is a reply to message #10235] Thu, 02 November 2006 16:34 Go to previous messageGo to next message
NACH is currently offline  NACH
Messages: 4
Registered: December 2004
Junior Member
Thanks David for the reply.........But do you know why we do not have
such a tool(dialog_pickfile with the capability to select multiple
files across different directories)? ....I am curious to know if there
is any technical reason.....

best wishes,
Nagur
Re: dialog_pickfile problem [message #51066 is a reply to message #10235] Thu, 02 November 2006 16:16 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nagur writes:

> I have a problem with dialog_pickfile. It doesnt allow me to select
> multiple_files across different subdirectories. Is there a way that
> will allow me to select multiple_files but from different directories?

Do you have *any* file selection tool on your operating
system that allows you to do this? I don't believe I've
ever seen one.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: dialog_pickfile problem [message #51238 is a reply to message #51064] Fri, 03 November 2006 11:07 Go to previous messageGo to next message
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
If you're on Windows, try the Accessories-System Tools-Backup program -
it does this by marking nodes in the directory tree.

Greg
Re: Dialog_pickfile problem [message #59933 is a reply to message #10235] Tue, 22 April 2008 07:38 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Apr 22, 9:36 am, Vince Hradil <hrad...@yahoo.com> wrote:
> On Apr 22, 9:29 am, clivecoo...@gmail.com wrote:
>
>> On Apr 22, 10:23 am, Vince Hradil <hrad...@yahoo.com> wrote:
>
>>> On Apr 22, 9:20 am, clivecoo...@gmail.com wrote:
>
>>>> On Apr 22, 10:19 am, Vince Hradil <hrad...@yahoo.com> wrote:
>
>>>> > On Apr 22, 9:12 am, clivecoo...@gmail.com wrote:
>
>>>> > > Hi,
>
>>>> > > I am using Dialog_pickfile to write a jpeg, using file='a string i
>>>> > > insert here'. My problem is that if i want to change the directory in
>>>> > > which dialog_pickfile defaults to it wipes the string i initially
>>>> > > inserted. Is there a way i can fix the default filename so that the
>>>> > > user can pick a directory to save the jpeg without having to retype
>>>> > > the file name back in?
>
>>>> > > filename = Dialog_Pickfile(/Write, File=uname
>>>> > > +'-'+info.file_name,DEFAULT_EXTENSION='jpeg')
>>>> > > IF filename NE '' THEN Write_JPEG, filename, snapshot, True=1
>
>>>> > > many thanks,
>
>>>> > > Clive
>
>>>> > Seems to me that you don't want to give the user a choice to make the
>>>> > filename. So, why not just have them choose a directory?
>
>>>> > dirname = Dialog_Pickfile(/Directory)
>>>> > if strlen(dirname) gt 0 then File=dirname+path_sep()+uname
>>>> > +'-'+info.file_name+'.jpeg'
>
>>>> Thats a good suggestion, however i do not want to remove the
>>>> possibility of the user to edit the filename.
>
>>>> thanks
>
>>>> Clive
>
>>> How about using filter=uname+'-'+info.file_name+'.jpeg' instead of
>>> file?
>
>> I don't think that works as when you set filter it only displays files
>> with that name. In this case the file is yet to be created.
>
> But isn't that okay? One should still see all the directories, no?

Nevermind, I just got on to my computer where I could actually try it.
Re: Dialog_pickfile problem [message #59934 is a reply to message #10235] Tue, 22 April 2008 07:36 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Apr 22, 9:29 am, clivecoo...@gmail.com wrote:
> On Apr 22, 10:23 am, Vince Hradil <hrad...@yahoo.com> wrote:
>
>> On Apr 22, 9:20 am, clivecoo...@gmail.com wrote:
>
>>> On Apr 22, 10:19 am, Vince Hradil <hrad...@yahoo.com> wrote:
>
>>>> On Apr 22, 9:12 am, clivecoo...@gmail.com wrote:
>
>>>> > Hi,
>
>>>> > I am using Dialog_pickfile to write a jpeg, using file='a string i
>>>> > insert here'. My problem is that if i want to change the directory in
>>>> > which dialog_pickfile defaults to it wipes the string i initially
>>>> > inserted. Is there a way i can fix the default filename so that the
>>>> > user can pick a directory to save the jpeg without having to retype
>>>> > the file name back in?
>
>>>> > filename = Dialog_Pickfile(/Write, File=uname
>>>> > +'-'+info.file_name,DEFAULT_EXTENSION='jpeg')
>>>> > IF filename NE '' THEN Write_JPEG, filename, snapshot, True=1
>
>>>> > many thanks,
>
>>>> > Clive
>
>>>> Seems to me that you don't want to give the user a choice to make the
>>>> filename. So, why not just have them choose a directory?
>
>>>> dirname = Dialog_Pickfile(/Directory)
>>>> if strlen(dirname) gt 0 then File=dirname+path_sep()+uname
>>>> +'-'+info.file_name+'.jpeg'
>
>>> Thats a good suggestion, however i do not want to remove the
>>> possibility of the user to edit the filename.
>
>>> thanks
>
>>> Clive
>
>> How about using filter=uname+'-'+info.file_name+'.jpeg' instead of
>> file?
>
> I don't think that works as when you set filter it only displays files
> with that name. In this case the file is yet to be created.

But isn't that okay? One should still see all the directories, no?
Re: Dialog_pickfile problem [message #59935 is a reply to message #10235] Tue, 22 April 2008 07:33 Go to previous messageGo to next message
clivecook59 is currently offline  clivecook59
Messages: 26
Registered: November 2005
Junior Member
On Apr 22, 10:31 am, David Fanning <n...@dfanning.com> wrote:
> clivecoo...@gmail.com writes:
>> I am using Dialog_pickfile to write a jpeg, using file='a string i
>> insert here'. My problem is that if i want to change the directory in
>> which dialog_pickfile defaults to it wipes the string i initially
>> inserted. Is there a way i can fix the default filename so that the
>> user can pick a directory to save the jpeg without having to retype
>> the file name back in?
>
> I just note, for the record, that the Windows version
> of DIALOG_PICKFILE works correctly. No re-typing required
> there. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Ah, i am using IDL 7. on a Mac, i guess that is the problem
Re: Dialog_pickfile problem [message #59936 is a reply to message #10235] Tue, 22 April 2008 07:31 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
clivecook59@gmail.com writes:

> I am using Dialog_pickfile to write a jpeg, using file='a string i
> insert here'. My problem is that if i want to change the directory in
> which dialog_pickfile defaults to it wipes the string i initially
> inserted. Is there a way i can fix the default filename so that the
> user can pick a directory to save the jpeg without having to retype
> the file name back in?

I just note, for the record, that the Windows version
of DIALOG_PICKFILE works correctly. No re-typing required
there. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Dialog_pickfile problem [message #59937 is a reply to message #10235] Tue, 22 April 2008 07:29 Go to previous messageGo to next message
clivecook59 is currently offline  clivecook59
Messages: 26
Registered: November 2005
Junior Member
On Apr 22, 10:23 am, Vince Hradil <hrad...@yahoo.com> wrote:
> On Apr 22, 9:20 am, clivecoo...@gmail.com wrote:
>
>
>
>> On Apr 22, 10:19 am, Vince Hradil <hrad...@yahoo.com> wrote:
>
>>> On Apr 22, 9:12 am, clivecoo...@gmail.com wrote:
>
>>>> Hi,
>
>>>> I am using Dialog_pickfile to write a jpeg, using file='a string i
>>>> insert here'. My problem is that if i want to change the directory in
>>>> which dialog_pickfile defaults to it wipes the string i initially
>>>> inserted. Is there a way i can fix the default filename so that the
>>>> user can pick a directory to save the jpeg without having to retype
>>>> the file name back in?
>
>>>> filename = Dialog_Pickfile(/Write, File=uname
>>>> +'-'+info.file_name,DEFAULT_EXTENSION='jpeg')
>>>> IF filename NE '' THEN Write_JPEG, filename, snapshot, True=1
>
>>>> many thanks,
>
>>>> Clive
>
>>> Seems to me that you don't want to give the user a choice to make the
>>> filename. So, why not just have them choose a directory?
>
>>> dirname = Dialog_Pickfile(/Directory)
>>> if strlen(dirname) gt 0 then File=dirname+path_sep()+uname
>>> +'-'+info.file_name+'.jpeg'
>
>> Thats a good suggestion, however i do not want to remove the
>> possibility of the user to edit the filename.
>
>> thanks
>
>> Clive
>
> How about using filter=uname+'-'+info.file_name+'.jpeg' instead of
> file?


I don't think that works as when you set filter it only displays files
with that name. In this case the file is yet to be created.
Re: Dialog_pickfile problem [message #59940 is a reply to message #10235] Tue, 22 April 2008 07:23 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Apr 22, 9:20 am, clivecoo...@gmail.com wrote:
> On Apr 22, 10:19 am, Vince Hradil <hrad...@yahoo.com> wrote:
>
>> On Apr 22, 9:12 am, clivecoo...@gmail.com wrote:
>
>>> Hi,
>
>>> I am using Dialog_pickfile to write a jpeg, using file='a string i
>>> insert here'. My problem is that if i want to change the directory in
>>> which dialog_pickfile defaults to it wipes the string i initially
>>> inserted. Is there a way i can fix the default filename so that the
>>> user can pick a directory to save the jpeg without having to retype
>>> the file name back in?
>
>>> filename = Dialog_Pickfile(/Write, File=uname
>>> +'-'+info.file_name,DEFAULT_EXTENSION='jpeg')
>>> IF filename NE '' THEN Write_JPEG, filename, snapshot, True=1
>
>>> many thanks,
>
>>> Clive
>
>> Seems to me that you don't want to give the user a choice to make the
>> filename. So, why not just have them choose a directory?
>
>> dirname = Dialog_Pickfile(/Directory)
>> if strlen(dirname) gt 0 then File=dirname+path_sep()+uname
>> +'-'+info.file_name+'.jpeg'
>
> Thats a good suggestion, however i do not want to remove the
> possibility of the user to edit the filename.
>
> thanks
>
> Clive

How about using filter=uname+'-'+info.file_name+'.jpeg' instead of
file?
Re: Dialog_pickfile problem [message #59941 is a reply to message #10235] Tue, 22 April 2008 07:20 Go to previous messageGo to next message
clivecook59 is currently offline  clivecook59
Messages: 26
Registered: November 2005
Junior Member
On Apr 22, 10:19 am, Vince Hradil <hrad...@yahoo.com> wrote:
> On Apr 22, 9:12 am, clivecoo...@gmail.com wrote:
>
>
>
>> Hi,
>
>> I am using Dialog_pickfile to write a jpeg, using file='a string i
>> insert here'. My problem is that if i want to change the directory in
>> which dialog_pickfile defaults to it wipes the string i initially
>> inserted. Is there a way i can fix the default filename so that the
>> user can pick a directory to save the jpeg without having to retype
>> the file name back in?
>
>> filename = Dialog_Pickfile(/Write, File=uname
>> +'-'+info.file_name,DEFAULT_EXTENSION='jpeg')
>> IF filename NE '' THEN Write_JPEG, filename, snapshot, True=1
>
>> many thanks,
>
>> Clive
>
> Seems to me that you don't want to give the user a choice to make the
> filename. So, why not just have them choose a directory?
>
> dirname = Dialog_Pickfile(/Directory)
> if strlen(dirname) gt 0 then File=dirname+path_sep()+uname
> +'-'+info.file_name+'.jpeg'

Thats a good suggestion, however i do not want to remove the
possibility of the user to edit the filename.

thanks

Clive
Re: Dialog_pickfile problem [message #59942 is a reply to message #10235] Tue, 22 April 2008 07:19 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Apr 22, 9:12 am, clivecoo...@gmail.com wrote:
> Hi,
>
> I am using Dialog_pickfile to write a jpeg, using file='a string i
> insert here'. My problem is that if i want to change the directory in
> which dialog_pickfile defaults to it wipes the string i initially
> inserted. Is there a way i can fix the default filename so that the
> user can pick a directory to save the jpeg without having to retype
> the file name back in?
>
> filename = Dialog_Pickfile(/Write, File=uname
> +'-'+info.file_name,DEFAULT_EXTENSION='jpeg')
> IF filename NE '' THEN Write_JPEG, filename, snapshot, True=1
>
> many thanks,
>
> Clive

Seems to me that you don't want to give the user a choice to make the
filename. So, why not just have them choose a directory?

dirname = Dialog_Pickfile(/Directory)
if strlen(dirname) gt 0 then File=dirname+path_sep()+uname
+'-'+info.file_name+'.jpeg'
Re: Dialog_pickfile problem [message #60020 is a reply to message #59935] Tue, 22 April 2008 18:01 Go to previous message
marika is currently offline  marika
Messages: 2
Registered: April 2008
Junior Member
<clivecook59@gmail.com> wrote in message
news:27cccfd2-3ec1-4831-aa9e-12763e8fe331@l42g2000hsc.google groups.com...
>
>
> Ah, i am using IDL 7. on a Mac, i guess that is the problem

o well, go back to your previous isp and opera


mk5000


"Can't you find a clue/When your eyes are painted Sinatra blue?"--Bon Iver
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Saving Workbench Layout?
Next Topic: Re: Atmospheric correction

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

Current Time: Wed Oct 08 15:16:08 PDT 2025

Total time taken to generate the page: 0.00843 seconds