Called functions

There are currently 3 functions that are being called from the Magnetron host:

main
Is called when pressing the run button in the app. Your main logic should be here.
onAbout
is called when 'recipe about' is selected in the app. Its expected to open a dialog or url.
onConfig
is called when 'recipe config' is selected in the app. This can be used as property setups or file selections. Which can be stored in global vars or temporary cache values in 'items'.

Each call to these functions has its own fresh global scope. Therefore if data need to be stored between these calls, like config settings then use memory cache getItems() and setItems().

Note; A few other functions are called as callback to ensure the user stays informed during longer processes. These functions include cmd_callback() for cmd calls to external tools. And LevelFileAnalyse_Progress() + LevelFileProcess_Progress() for leveling progress.

examples

function main()
{
    setMainMessage("test");
}

// the onAbout() function is called when the user clicks the about option for this recipe
function onAbout()
{
    dialog( header.title, header.description, "i" );
}

// the onConfig() function is called when the user clicks the config option for this recipe
function onConfig()
{
    dialog( header.title, "config", "i" );
}