Show a ShiVa save dialogue.


  1. kDialogResult|nil = gui.showSaveDialog ( hVariable|aVariables|nil )


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.


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


  1. function onMainViewPrepareForBuild ( )
  2. -- if nothing to save => vResult will be "nil" => we must return true
  3. -- if user clicked "ok" => vResult will be "true" => we must return true
  4. -- if user clicked "cancel" => vResult will be "false" => we must return false
  5. --
  6. local vResult = gui.showSaveDialog ( nil )
  7. return ( vResult ~= gui.kDialogResultCanceled )
  8. end

Available since ShiVa 2.0