Hello there o/
I want to change the value in dialog elements on the fly.
For example, there are radiobutton components and I want to change the file extension of the file component when switching them:
:radio{
id="fontTypeMFK",
label="Export as:",
text="Millfork (Text)",
selected=true,
onclick=function()
dlg.data.filename=app.fs.joinPath(app.fs.filePath(lay.sprite.filename), title .. ".mfk")
dlg:repaint()
end
}:newrow()
:radio{
id="fontTypeBIN",
text="Binary",
selected=false,
onclick=function()
dlg.data.filename=app.fs.joinPath(app.fs.filePath(lay.sprite.filename), title .. ".fnt")
dlg:repaint()
end
}
:file {
id="filename",
label="File name:",
save=true,
focus=false,
filename=app.fs.joinPath(app.fs.filePath(lay.sprite.filename), title .. ".fnt")
}
When switching radiobuttons no errors occur, but the filename value does not change either?
What am I doing wrong?