WD The indirections - Programação oop com indirection - Recortar, Copiar, Colar, Desfazer, Refazer
IF {ControlCurrent(),indControl}..Value~="" THEN
RETURN
ELSE
ToClipboard({ControlCurrent(),indControl}..Value)
{ControlCurrent(),indControl}..Value=""
END
//------------------------------------------------------------------------------------------
IF {ControlCurrent(),indControl}..Value~="" THEN
RETURN
ELSE
// Transfer to the clipboard
ToClipboard({ControlCurrent(),indControl}..Value)
END
//-------------------------------------------------------------------------------------------
// Retrieve from the clipboard
{ControlCurrent(),indControl}..Value=Clipboard()
//------------------------------------------------------------------------------------------
sNote is string
// Retrieve the value found in the note
sNote = {ControlCurrent(),indControl}..Note
// Store for the REDO
{ControlCurrent(),indControl}..Note={ControlCurrent(),indControl}..Value
// Restores the former value (the one read in the file)
{ControlCurrent(),indControl}..Value= sNote
//----------------------------------------------------------------------------------------------
IF NOT {ControlCurrent(),indControl}..Note~="" THEN
// Restores the former value (stored during the UNDO)
{ControlCurrent(),indControl}..Value={ControlCurrent(),indControl}..Note
END