dialog_pickfile problem [message #10235] |
Wed, 05 November 1997 00:00  |
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 #51053 is a reply to message #10235] |
Fri, 03 November 2006 08:17   |
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 #59933 is a reply to message #10235] |
Tue, 22 April 2008 07:38   |
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   |
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   |
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 #59937 is a reply to message #10235] |
Tue, 22 April 2008 07:29   |
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   |
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   |
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   |
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  |
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
|
|
|