With Helm 4.7.1, you can now show simple dialog boxes and alerts in Helm panels.
You can use these with Lua scripting from PC-based Helm panels (but not WebPanels yet…)
The script functions are available using the RootPanel object, and are as follows
H.RootPanel:ShowError()
H.RootPanel:ShowWarning()
H.RootPanel:ShowInformation()
Each can take up to three parameters – the primary message, some details, and “expanded” information which is initially hidden from the user. Here’s a sample
H.RootPanel:ShowError("Something bad happened","The details...", "and some extra stuff" )
You can use just a single parameter.
H.RootPanel:ShowError("Something bad happened")
Asking Questions
There are two functions for prompting the user input: AskYesNo
and WarnOkCancel
. Again, they take up to three parameters, but they return a boolean value ‘true’ if the user selects Yes or OK
if H.RootPanel:AskYesNo("Continue?") then
...
end
File Load and Save dialogs
… to be completed…