Dispatch.Rd
Send messages to jamovi tables from anywhere in the code. Warnings can be sent to tables or arrays. For tables in Array, they do not need to exist at the moment the message is broadcast, because the message is stored in the parent object and then passed to the table at run time.
Warnings can be transient (get removed after .init()) when init=TRUE
is passed.
Errors must be sent to existing (already defined) objects. Errors are passed directly
to the jamovi object. If option final=TRUE
, a stop()
is issued
@export
warnings
Set a warning message to a jamovi table It accepts a list with fields:
topic
the nickname of a table in the format:
tablename
a name of the table as set in the r.yaml
jamovi file
groupname_tablename
the group the table belongs to and the table name
arrayname
the array of the tables target of the message
message
the message to broadcast
init
(optional) init=TRUE
makes the message transient (disappears after init)
errors
set an error message to a jamovi table It accepts a list with fields:
topic
the nickname of a table in the format:
tablename
a name of the table as set in the r.yaml
jamovi file
groupname_tablename
the group the table belongs to and the table name
arrayname
the array of the tables target of the message
message
the message to broadcast
final
(optional) final=TRUE
makes module stop computation immediately
translate()
Translate a message
msgobj
a list containing the field message
. The function looks in the environment
for a global list named TRANS_WARNS
. The list must contain lists with the field original
and
one of the following: new
: a new message to replace original
;
sub
: a string to substitute the original
string. append
: a string to append to original
.
prepend
: a string to prepend to original
. The field are evaluated in this order.
To remove a warning or error, simple set new=NULL