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

Home » Public Forums » archive » DIALOG_PICKFILE bug
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 bug [message #91169] Wed, 10 June 2015 09:03 Go to next message
markb77 is currently offline  markb77
Messages: 217
Registered: July 2006
Senior Member
While we are bringing up bugs in IDL, this one is particularly annoying and has been around for far too long.

When using the FILE keyword of DIALOG_PICKFILE, if the filename is longer than 15 characters, it is cut off in the dialog's "File name:" window.

In other words, when providing a default file name for the user to read from, which may be "my_long_filename.txt", the user is presented with a dialog which seems to be opening the file "ng_filename.txt".

This is not acceptable for professional code! The problem is demonstrated in the following code snippet.

test code:

;----------------------------

pro dialog_pickfile_bug

fname = 'my_long_filename.txt'

result = DIALOG_PICKFILE(file=fname)

; On Windows, DIALOG_PICKFILE does not show the full
; filename in the "File name:" window of the dialog!

print, result

end
;-----------------------------

This problem has been discussed in this newsgroup many times, and is described on David Fanning's page. One workaround, which is to specify the "WRITE" keyword, is not workable if the user is READING a file. In this case if "WRITE" is specified, the "Open" button of the dialog changes "Save", which is not what the user is expecting to do!

Dear IDL development team, would you please finally address this issue?

best,
Mark
Re: DIALOG_PICKFILE bug [message #91170 is a reply to message #91169] Wed, 10 June 2015 09:05 Go to previous messageGo to next message
markb77 is currently offline  markb77
Messages: 217
Registered: July 2006
Senior Member
my system details:

IDL Version 8.3, Microsoft Windows (Win32 x86_64 m64)
Re: DIALOG_PICKFILE bug [message #91173 is a reply to message #91170] Thu, 11 June 2015 03:22 Go to previous messageGo to next message
markb77 is currently offline  markb77
Messages: 217
Registered: July 2006
Senior Member
This is indeed a bug in Windows, apparently:

http://stackoverflow.com/questions/6844635/openfiledialog-do es-not-show-complete-filename-in-windows-7

http://stackoverflow.com/questions/24525606/openfiledialog-c uts-off-pre-populated-file-name

Although a workaround exists, as discussed in the links.
Re: DIALOG_PICKFILE bug [message #91258 is a reply to message #91173] Tue, 23 June 2015 14:03 Go to previous messageGo to next message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
On 06/11/15 06:22, superchromix wrote:
>
> This is indeed a bug in Windows, apparently:
>
> http://stackoverflow.com/questions/6844635/openfiledialog-do es-not-show-complete-filename-in-windows-7
>
>
> http://stackoverflow.com/questions/24525606/openfiledialog-c uts-off-pre-populated-file-name
>
> Although a workaround exists, as discussed in the links.
>

So, I guess the lesson here is: don't use Windows for professional code.

(har har).

But seriously, even though I'm a *nix-only guy, I sympathise.
Re: DIALOG_PICKFILE bug [message #91334 is a reply to message #91258] Tue, 30 June 2015 09:49 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Tuesday, June 23, 2015 at 3:03:37 PM UTC-6, Paul van Delst wrote:
> On 06/11/15 06:22, superchromix wrote:
>>
>> This is indeed a bug in Windows, apparently:
>>
>> http://stackoverflow.com/questions/6844635/openfiledialog-do es-not-show-complete-filename-in-windows-7
>>
>>
>> http://stackoverflow.com/questions/24525606/openfiledialog-c uts-off-pre-populated-file-name
>>
>> Although a workaround exists, as discussed in the links.
>>
>
> So, I guess the lesson here is: don't use Windows for professional code.
>
> (har har).
>
> But seriously, even though I'm a *nix-only guy, I sympathise.

Yeah, I'm not sure what to do with this bug. I really don't want to put in a keyword to dialog_pickfile called "/WORK_AROUND_WINDOWS7_BUG". Besides, then it makes it look all ugly like Windows XP.

So I think I'm going to just sit on this bug and hope that Windows 7 goes away.

Cheers,
Chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: end of file in the middle of a text file
Next Topic: restore in IDL 8.4

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

Current Time: Wed Oct 08 15:34:44 PDT 2025

Total time taken to generate the page: 0.00537 seconds