Arbortext Command Language > Callbacks > doc_add_callback > tbl_insert Callback Type
  
tbl_insert Callback Type
Function prototype:
function funcname (doc, oid, pos, rows, cols, tmid, tag, op)
tbl_insert is called before a table is inserted into the document.
Arguments
doc is the identifier of the document containing oid.
oid and pos indicate where the table is being inserted.
rows and cols indicate the number of rows and columns (respectively) within the table that is being inserted.
tmid is the table model ID of the table model that will manage the table being inserted.
tag is name of the wrapper tag for the table being inserted.
op is the function callback operation. Callbacks are called twice in succession with op specifying the stage of callback operation.
1. op == 1 first call — The returned argument specifies whether the execution should continue or be stopped:
0 — Continue callback processing.
-1 — Stop further callback processing.
2. op == 2 second call — Occurs unless the processing was stopped during the first call. The returned argument allows or prevents basic Arbortext Editor processing after all callbacks have been called:
0 — Basic Arbortext Editor processing allowed.
-1 — Basic Arbortext Editor processing prevented.
* 
tbl_insert will not be executed if a table is inserted as the result of a copy from a paste buffer into a document.