gui.showSaveDialog
Show a ShiVa save dialogue.
Prototype
kDialogResult|nil = gui.showSaveDialog ( hVariable|aVariables|nil )
Description
The Save dialogue will only pop up if at least one item/entry/... has been modified, otherwise it will return nil. You can pass one variable or a set of variables. The save dialog will determine which one of them needs to be saved. If there are no parameters, the save dialog will present all the currently modified variables. This is what happens f.i. when you want to quit ShiVa or switch to another project.
Parameters
hVariable|aVariables|nil - pass a variable or an array of variables that you want to save, or nil to save all
Return values
kDialogResult|nil - predefined accepted/canceled/rejected constant, or nil if nothing has changed
Sample
function onMainViewPrepareForBuild ( ) -- if nothing to save => vResult will be "nil" => we must return true -- if user clicked "ok" => vResult will be "true" => we must return true -- if user clicked "cancel" => vResult will be "false" => we must return false -- local vResult = gui.showSaveDialog ( nil ) return ( vResult ~= gui.kDialogResultCanceled ) end
Available since ShiVa 2.0