Bug in SaveFileDialog

P

picander77

Hello there,

I found a bug using SaveFileDialog and I was not able to find any
similar issue on the web.
This seems to apply to any .NET Applications using SaveFileDialog.

To perform the bug:
1. Open a SaveFileDialog and save any File, e.g. TestDocument0.txt:
This should create a document named TestDocument0.txt
2. Call once again the SaveFileDialog, select the TestDocument0.txt you
created in the File Window: The name of the File appears in the Text
Box, left of the "Open" Button. (Notice, the Selected File is still
grayed in the File Window)
3. Rename the Text in this Text Box, e.g. TestDocument1.txt: (Notice,
the Selected File is still grayed in the File Window)
4. Click in the File Window, but not on a folder or a file. The
previously selected File is not grayed anymore, the focus is set on
nothing.
5. Press the "Save" Button, you will get the following Waning:
"File TestDocument0.txt already exists. Do you want to replace it"
The error is obvious, it should save my file as TestDocument1.txt, and
not TestDocument0.txt, as it appears on the Text Box.

Could you reproduce such strange behaviour?
Thanks for your help

Picander
 
C

Chris Jobson

Hello there,

I found a bug using SaveFileDialog and I was not able to find any
similar issue on the web.
This seems to apply to any .NET Applications using SaveFileDialog.

To perform the bug:
1. Open a SaveFileDialog and save any File, e.g. TestDocument0.txt:
This should create a document named TestDocument0.txt
2. Call once again the SaveFileDialog, select the TestDocument0.txt you
created in the File Window: The name of the File appears in the Text
Box, left of the "Open" Button. (Notice, the Selected File is still
grayed in the File Window)
3. Rename the Text in this Text Box, e.g. TestDocument1.txt: (Notice,
the Selected File is still grayed in the File Window)
4. Click in the File Window, but not on a folder or a file. The
previously selected File is not grayed anymore, the focus is set on
nothing.
5. Press the "Save" Button, you will get the following Waning:
"File TestDocument0.txt already exists. Do you want to replace it"
The error is obvious, it should save my file as TestDocument1.txt, and
not TestDocument0.txt, as it appears on the Text Box.

Could you reproduce such strange behaviour?
Thanks for your help

It think it's an issue in the underlying Windows standard dialog and nothing
to do with .NET - you can reproduce it by saving a text file from Notepad.
I've never noticed it before, but since it depends on your step 4, which is
a fairly pointless thing to do (though I can accept it might happen
accidentally), that's not surprising :)

Chris
 
P

picander77

Hello Chris,

You are right, even the notepad is affected by this bug. I think we
just have to live with it.
Thanks for your help.

If somebody has another suggestion though...

Picander
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top