local PACKED = "p"
local AJSON "j"
local infered_json_filename = nil
dlg:file{
id = PACKED,
label = PACKED,
filetypes = {"png"},
open = true,
load = false,
onchange = function()
local png_path = dlg.data[PACKED];
infered_json_filename = app.fs.joinPath(app.fs.filePath(png_path), app.fs.fileTitle(png_path) .. ".json")
-- weirdly still not effecting the file json default
print(infered_json_filename)
end
}:file{
id = AJSON,
label = AJSON,
filename = infered_json_filename,
filetypes = {"json"},
open = true,
load = false,
onchange = function() print("test") end
}:show()
So I popup two file picker dialogs and after picking the png file, I want to auto-fill in the filepath for the next file picker dialog in infered_json_filename
for ergonomic reasons. When I print it out it is correct but in the UI it is not updating, as you can see it still says “Select File”: