HTML Compiler: File Filters


Bryce Beattie
Any chance we could get file filters in appFileOpenDialog() and appFileSaveDialog()? So I could call those functions with a parameter that would be either a string, or maybe an array of strings:
chosenFile = window.external.appFileOpenDialog(".ext");
and the file chooser would have .ext (or whatever I wanted) as the default extension? Thanks!

decsoft

Hello Bryce,

Upgrade your DecSoft HTML Compiler copy. You can see now in the help file and in the Dialogs sample how we can use an optional "FileTypes" argument in both "appFileOpenDialog()" and "appFilesaveDialog()". This optional "FileTypes" argument allows to specify one or more file types, which are composed by their own display name and file mask.

Additionally the "appFileSaveDialog()" have also another new "DefaultExt" optional argument. This argument allows to specify a file extension to be used by default in the dialog. When the user save a file without file extension, the default extension is used. Please, take a look at the documentation and the Dialogs sample for more information and details.



Bryce Beattie
Sweet. I'll check it out. Thanks a million!

Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.