Tk Source Code

View Ticket
Login
Ticket UUID: 1578519
Title: tk_getOpenFile -multiple 1 fails the first times
Type: Bug Version: obsolete: 8.5b2
Submitter: fvogel Created on: 2006-10-16 21:29:39
Subsystem: 37. [tk_get*File] Assigned To: hobbs
Priority: 8 Severity:
Status: Closed Last Modified: 2014-02-19 21:42:20
Resolution: Invalid Closed By: fvogelnew1
    Closed on: 2007-11-13 12:22:40
Description:
tk_getOpenFile -multiple 1  fails the first times 
(WinXP)

The above instruction correctly opens the (native) 
WinXP dialog, and allows the user to select more than 
one file as expected.

A problem happens however when the user, before 
selecting his files, clicks on the "Desktop" shortcut 
icon located in the left pane of the dialog. In such 
a case, on clicking on the Open button from the 
dialog, a popup window shows up saying that the file 
cannot be found and that the user should check the 
filename.

Further observations:

a. Navigating by hand to the same location as the 
shortcut points to (usually C:\Documents and 
Settings\<USER>\Desktop) does not produce the same 
problem.

b. It does not happen when the -multiple 1 option is 
not set.

This happens again and again until tk_getOpenFile 
returns at least one filename. To repeat the bug, 
you'll have to start a new wish session.

Francois
User Comments: fvogelnew1 added on 2007-11-13 19:22:40:
Logged In: YES 
user_id=1245417
Originator: YES

OK, let's live with this.

I tried a bit with other programs, and it doesn't happen with MS Word nor with Visual Studio 8 Express Edition, nor with... well, the only app I could reproduce this with is Adobe Acrobat 5.0 (I don't happen to have a more recent version at hand).

So definitely out of Tk.

Many thanks for your assistance and time.

Francois

dkf added on 2007-11-13 16:57:04:
Logged In: YES 
user_id=79902
Originator: NO

See also 1538201 for how badly messed up shell extensions can be.

dkf added on 2007-11-13 16:51:38:
Logged In: YES 
user_id=79902
Originator: NO

I cannot reproduce with the Tk HEAD. Followed your instructions *exactly*, everything worked. This is on WinXP SP2, (English/UK version).

At a guess it's a shell extension; some of those are really badly written. Not much we can do about it either; it seems to be a fault in Windows, not Tk. (You can verify this by seeing whether the problem also occurs in other programs that support multiple selections in the system open file dialog; there's quite a few about.)

fvogelnew1 added on 2007-11-13 07:46:19:
Logged In: YES 
user_id=1245417
Originator: YES

Well, I can only confirm my report.

Let's try to be more precise:

WinXP (in french), Tcl/Tk8.5b2.

1. Open wish
2. Type tk_getOpenFile -multiple 1
3. Click on the icon labelled Desktop on the left hand side navigation bar of the file open dialog
4. Select more than one file in the dialog, say by dragging the mouse over two filenames
5. Click on OK.

Then I have the error message.

I also confirm that Navigating by hand to the same location as the shortcut points to does not produce the same problem, nor it doesn't show up with -multiple 0.

Note that the problem doesn't happen if you select only one file in the dialog, perhaps that's why you couldn't reproduce?

hobbs added on 2007-11-13 07:21:52:
Logged In: YES 
user_id=72656
Originator: NO

2 other reports of OK (patthoyts and kostix).  Please verify on another box.  Perhaps some wacky shell extension at work?

hobbs added on 2007-11-13 07:18:10:
Logged In: YES 
user_id=72656
Originator: NO

I can't repro this.  I open tkcon, call [tk_getOpenFile -multiple 1], click on Desktop in the left hand nav.  I can either then click [Open] and see that it cds into the real Desktop dir, of I can click on link.  In any case, I get no errors.

fvogelnew1 added on 2007-10-31 13:30:25:
Logged In: YES 
user_id=1245417
Originator: YES

Still here with 8.5b2.

fvogelnew1 added on 2006-12-13 05:53:59:
Logged In: YES 
user_id=1245417
Originator: YES

Happens on Win2000 too, btw.

Francois