file: 01-C-event.t package: muf status: alpha
This function accepts a symbol naming a restart, or else a
restart identifier, which must have been obtained from
getNthRestart, either directly or indirectly (as
via findRestart) and invokes it.
If the :interactiveFunction value for the
restart is nil, it is assumed that the
:function takes no arguments, and it is invoked
directly; If the :interactiveFunction value for
the restart is not nil, it should be a function
which constructs an appropriate argument block for the
:function, typically using the
queryFor* functions -- See section user i/o functions.
The invokeRestartInteractively function
returns only if the restart :function itself
returns -- many will do a goto to some suitable
tag.
Example:
[   :name 'print
    :function  :: { [] -> }   |pop -> text   ]pop   text ,  ;
    :interactiveFunction :: [ "text to print" "" queryForString | ;
    :reportFunction "Print something on standardOutput"
| ]withRestartDo{
    'print invokeRestartInteractively
}
will prompt the user for text to print, print it, and return.
The invokeRestartInteractively function is
currently implemented as
: invokeRestartInteractively { $ -> ! } -> restart
    restart symbol? if
        restart nil findRestart -> restart
    fi
    restart getRestart
    -> name
    -> fn
    -> tFn
    -> iFn
    -> rFn
    -> data
    -> id
    iFn if
        iFn call{ -> [] }
        fn call{ [] -> }
    else
        fn call{ -> }
    fi
;
'invokeRestartInteractively export
Go to the first, previous, next, last section, table of contents.