application.isUndoStackAtSavePoint

Determines whether an undo action can be performed or if the stack is at the last savepoint.

Prototype

  1. bYes = application.isUndoStackAtSavePoint ( hUndoStack )

Description

You cannot undo further than the last savepoint.


Parameters

hUndoStack - undo stack handle


Return values

bYes - true if at savepoint


Sample

  1. local hCurrentUndoStack = application.getUndoStackFromTarget ( hResource )
  2. if ( hCurrentUndoStack ) then
  3. gui.setMenuItemStateAt ( hMainMenuFile, gui.getObjectUID ( gui.getComponentFromView ( hView, "mainMenu.file.save" ) ), gui.kMenuItemDisabled, bForceDisabled
  4. or
  5. application.isUndoStackAtSavePoint ( hCurrentUndoStack ) )
  6. end

Available since ShiVa 2.0