DIALOG_PICKFILE bug [message #91169] |
Wed, 10 June 2015 09:03  |
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 #91334 is a reply to message #91258] |
Tue, 30 June 2015 09:49  |
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
|
|
|