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!

David Esperalta

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's support forum for learning purposes, however only DecSoft's customers can post new threads. Purchase one or more licenses of some DecSoft's products in order to give this and other benefits.