The procedure wrapper function. Used to provide a simplified way of
calling a procedure and connecting results through signals (instead of
using deferred callbacks).
The actual calls are performed with normal function calls, but the results
are asynchronous. When called, the procedure function returns a
MochiKit.Async.Deferred object (as the normal API call), but the results
will also be signalled through the onsuccess signal.
Differing from normal functions, a procedure function will also ensure
that only a single call is in progress at any time, automatically
cancelling any previous call if needed.
Source code:
RapidContext_Procedure.js
RapidContext.Procedure(procedure)
Creates a new procedure caller function.
|
The arguments used in the last call.
|
|
The procedure name.
|
cancel()
Cancels any current execution of this procedure.
|
|
<static> |
RapidContext.Procedure.mapAll(obj)
Creates a new procedure caller for each key-value-pair in the specified
object.
|
multicall(args, transform)
Calls the procedure multiple times (in sequence) with different arguments
(supplied as an array of argument arrays).
|
|
recall()
Calls the procedure with the same arguments as used in the last call.
|
|
reset()
Cancels any current execution and removes the reference to the arguments of
this procedure.
|
oncall()
Emitted when the procedure is called.
|
|
oncancel()
Emitted when a procedure call was cancelled.
|
|
onerror()
Emitted when a procedure call failed.
|
|
Emitted when the procedure response has been received.
|
|
Emitted when a procedure call returned a result.
|
|
onupdate()
Emitted if a partial procedure result is available.
|