[JW Lua] FCFileOpenDialog:SetInitFolder behaviour

Jan Angermüller jan at angermueller.com
Thu Sep 3 17:32:59 CEST 2015


I would like to show a file open dialog in one of the Finale sub 
folders, but it always opens in the default JW Lua folder.
Below is the code. I don't what goes wrong. GetInitFolder() returns the 
correct sub folder, but Execute() always shows the JW Lua folder. I am 
testing on Windows and the folder is 
"C:\Users\USERNAME\AppData\Roaming\MakeMusic\Finale 2014\Libraries"

local dir = finale.FCString()
dir:SetLibFolderPath()
local opendlg=finale.FCFileOpenDialog(finenv.UI())
opendlg:SetInitFolder(dir)
opendlg:GetInitFolder(dir) --read the value from opendlg and store it 
again in dir
print(dir.LuaString)   --prints 
c:\Users\USERNAME\AppData\Roaming\MakeMusic\Finale 2014\Libraries
opendlg:Execute()    --shows the folder x:\eigene dateien\jw lua where 
the lua scripts are located

Any ideas ?

BTW, Get/SetInitFolder are missing in the online documentation, but are 
listed in the class browser.

Jan




More information about the JWLua mailing list