I have just created a save function with the following code:
local file = ui.savedialog("", false, "quill file (*.ecquill)|*.ecquill")
if file ~= nil then
file:open("write")
file:write(result)
file:flush()
file:close()
end
This works fine. As soon I save the file I can open the file with the windows notbook and see the content.