SaveAsDialog and FileType:Folder

I’m using a SaveAsDialog to let the user select the location of and name the export folder.
I’ve set up the special/folder filetype, and I’m using the SaveAsDialog.Filter properly.

On Mac if you name the folder the same as one that’s already existing it asks if you’d like to replace the folder.
On Windows, it navigates inside the folder…
Obviously the Mac action is preferred.

Is there something special you need to do on Windows to make it behave properly? (besides uninstall Windows)
Is this behavior specific to the version of Windows I’m using? (Win7)

How can I allow the user to simply replace a whole folder if they choose on the Windows platform?

Use SelectFolderDialog, so when you get the name of the folder selected, you can present the user with a confirmation dialog the same way as Mac OS X does, then replace if needed, or simply open.

SelectFolderDialog is for selecting a folder. Such as selecting the Desktop. I’m using SaveAsDialog because it’s creating data, and makes it easier to understand how it will be packaged. Using a SelectFolderDialog offers the confusion of “will this app put all the files here? or will it put them inside a folder here?”

The paradigm is like exporting a PNG from your favorite image editor, the output from my app just happens to be a folder full of files.

[quote=118081:@Tim Parnell]SelectFolderDialog is for selecting a folder. Such as selecting the Desktop. I’m using SaveAsDialog because it’s creating data, and makes it easier to understand how it will be packaged. Using a SelectFolderDialog offers the confusion of “will this app put all the files here? or will it put them inside a folder here?”

The paradigm is like exporting a PNG from your favorite image editor, the output from my app just happens to be a folder full of files.[/quote]

You want to have the same behavior of your app as in Mac OS X.

The normal Windows way is to open the folder and merge the content, not to ask confirmation like in Mac OSX. So if you want the replace folder functionality of Mac OS X, you got to emulate it. If you want to save indiscriminately files and folders, the SaveAsDialog will not give you a chance to present the user with an extra confirmation dialog and act accordingly if the user chooses the same folder name.

If SelectFolder won’t do, I see no other way than to create a dialog that emulates the Mac OS X way, probably with a window, a listbox, a TextField, etc… But I may be mistaken …

Such a shame, that’s exactly what I want :confused:

Time for some #if TargetWin32 I guess.

Thanks for your expertise.

Indeed. You have reached the limit of native controls cross platform, when the control behavior is different between Windows and Mac OS X.

You may want to check /Xojo 2014 Release 2.1/Example Projects/Files/FileBrowser.xojo_binary_project

It makes a great base for a custom SaveAsDialog.