Documentation of restorepointers


Global Index (short | long) | Local contents | Local Index (short | long)


Function Synopsis

restorepointers( pj )

Help text

RESTOREPOINTERS Restore Pointers of all open Figures. 
   PREPAREPOINTERS previously set all Figure Pointers to Watch.

   See also PREPAREPOINTERS.

Cross-Reference Information

This function is called by

Listing of function restorepointers

function restorepointers( pj )

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.2 $  $Date: 2000/06/01 02:54:07 $

%Make sure we set pointer(s) back even if we are erroring out.
switch length(pj.AllFigures)
 case 0
    %NOP
 case 1
   if ishandle(pj.AllFigures), set( pj.AllFigures, 'pointer', pj.AllPointers ); end; 
 otherwise, 
  m = ishandle(pj.AllFigures); 
  pj.AllFigures  = pj.AllFigures(m); % remove bad handles 
  pj.AllPointers = pj.AllPointers(m); 
  set( pj.AllFigures, {'pointer'}, pj.AllPointers ); 
end