Arbortext Command Language > Callbacks > doc_add_callback > pending_delete Callback Type
  
pending_delete Callback Type
Function prototype:
function funcname (doc, op)
pending_delete is called before a pending delete operation occurs in the Edit pane.
Arguments:
doc — The identifier of the document in which the delete was attempted. It can be used to derive the cursor position or the selected region.
op — The function callback operation. It is generally called twice in succession
1. First call: op == 1. Tests to verify the operation can be attempted. Return arguments are:
0 — Proceed to the Execute step.
-1 — Ignore callback. The code should continue as before.
2. Second call: (occurs unless the process was stopped in the first step) op == 2. Instructs to continue and process the request. Return arguments are:
0 — The code should still control processing.
-1 — The code should be skipped (cancels the pending delete and the insert operation).
1 — The delete should be skipped, but proceed with the insert operation.