application.undo

Undoes an editor/user action from a specified stack.

Prototype

  1. bOk = application.undo ( hUndoStack )

Parameters

hUndoStack - undo stack handle


Return values

bOk - true on success


Sample

  1. function onViewUndo ( hView, hComponent )
  2.  
  3. local hResource = this.getViewVariable ( hView, "hCurrentResource" )
  4. if ( hResource )
  5. then
  6. local hCurrentUndoStack = application.getUndoStackFromTarget ( hResource )
  7. if ( hCurrentUndoStack )
  8. then
  9. application.undo ( hCurrentUndoStack )
  10. end
  11. end
  12. end

Available since ShiVa 2.0