[JW Lua] AssureFileExtension()

Thomas Weber thomas.weber at notengrafik.com
Sat Aug 6 17:04:30 CEST 2016


You're totally right, Chris.  Then it is odd that calling it *before* Execute() also has an effect (the mentioned pre-filling of the input field).

Thanks!


Am 05.08.2016 um 18:50 schrieb Chris:
> Thomas
>
> I think "AssureFileExtension" should be after "Execute"
>
> ------------------------------
> local dialog = finale.FCFileSaveAsDialog(finenv.UI())
>
> local filter = finale.FCString()
> filter.LuaString = "*.txt"
> local description = finale.FCString()
> description.LuaString = "text files (*.txt)"
> dialog:AddFilter(filter,description)
>
> dialog:Execute()
>
> dialog:AssureFileExtension(".txt")
> local fileName = finale.FCString()
> dialog:GetFileName(fileName)
> print(fileName.LuaString)




More information about the JWLua mailing list