Tcl.createCommand

Create a new command in the Tcl interpreter.

class Tcl
Tcl_Command
createCommand
(
string name
,
Tcl_CmdProc commandProcedure
,
ClientData data = null
,
Tcl_CmdDeleteProc deleteProcedure = null
)

Parameters

name string

The name of the new command.

commandProcedure Tcl_CmdProc

A function pointer to the new command.

data ClientData

Extra data to be passed to the command on invocation.

deleteProcedure Tcl_CmdDeleteProc

The procedure to run when deleteCommand is called.

Return Value

Type: Tcl_Command

A command token that can be used to refer to the command created.

Meta