Foxtools – Editor _EDREDO

Version: 01.10.10 - last Update: Tuesday, October 13, 2009, 13:05:00

Previous ChapterFoxtools Home (Alphabetical TOC)Foxtools Home (Grouped TOC)Next Chapter See also:_EdUndo | _EdUndoOn


Foxtools Editor Support Functions

_EDREDO

_EdRedo() Reverts the last Undo (repeats the action that was cancelled by that Undo) in the editor session passed in <nWHANDL>.

VFP Syntax

= _EdRedo(nWHAND)

Parameters

[in] nWHAND

Fox-window handle of the editor session in question. If nWHANDL is no valid editor-session handle, an error “API call caused an exception” (Error 2028) is raised.

    Returns

    VOID - no evaluable return value, coz always TRUE.

    Remarks

    Note: Calling _EdRedo() passing an invalid editor session handle does not cause a General Protection Fault. _EdRedo() may be called more than once in a row to revert more than one Undo. Edit actions that can be undone or reverted (using _EdUndo() and _EdRedo()) may be grouped enclosing them between _EdUndoOn() commands.

    VFP Example(s)

    Opening an editor session, insert some text, then Undo and Redo changes:

    *\\ Open editor session
    nWHAND =_EDOPENFIL("TEST.TXT", 1)
    lcText = "NEW TEST" 
    *\\ insert a word 
    = _EDINSERT(m.nWHAND,m.lcText,3)
    WAIT WINDOW "Press any key to UNDO last insert"
    = _EDUNDO(m.nWHAND)
    WAIT WINDOW "Press any key to REDO insert"
    = _EDREDO(m.nWHAND)
    

    Previous ChapterFoxtools Home (Alphabetical TOC)Foxtools Home (Grouped TOC)Next Chapter