  CLASS
    tcl.lang.Interp -- This manual entry contains Interp methods that implement new Tcl commands in Java.
  METHODS
    void createCommand(String cmdName, Command cmd)
    int deleteCommand(String cmdName)
    Command getCommand(String cmdName)
  OTHER METHODS
  ARGUMENTS
  DESCRIPTION
    createCommand
    deleteCommand
    getCommand
  EQUIVALENT C FUNCTIONS
  SEE ALSO
  KEYWORDS

### CLASS

tcl.lang.Interp -- This manual entry contains Interp methods that implement new Tcl commands in Java.

### METHODS

void createCommand(String cmdName, Command cmd)

int deleteCommand(String cmdName)

Command getCommand(String cmdName)

### OTHER METHODS

setVar, traceVar, eval, setResult, backgroundError,
getNotifier, setAssocData, dispose, pkgRequire

### ARGUMENTS

String cmdName ()
  Name of command to create, delete, or get.

Command cmd ()
  Value of command to create.

### DESCRIPTION

The procedures described here are utilities for creating, querying, modifying, and deleting Tcl commands.

createCommand
  The createCommand method defines a new command in the interp and associates it with the object cmd such that whenever cmdName is invoked as a Tcl command (via a call to Interp's eval method) the Tcl interpreter will call cmd.cmdProc to process the command. If an old Command object with cmdName already exists in the interpreter, the old Command object will be deleted. If the old Command object implements the CommandWithDispose interface, its disposeCmd() method will be called. See CommandWithDispose below.

deleteCommand
  The deleteCommand method deletes the command with the name cmdName from the interpreter. If the command exists, it is deleted and this method returns 0. If the command does not exist, this method returns -1. If the cmd object implements the CommandWithDispose interface, its disposeCmd() method will be called after the command is deleted.

getCommand
  The getCommand method returns the Command object that represents the command with the name cmdName.

### EQUIVALENT C FUNCTIONS

Tcl_CreateCommand, Tcl_DeleteCommand, Tcl_GetCommandInfo

### SEE ALSO

Interp, CommandWithDispose, Eval, Command

### KEYWORDS

bind, command, create, delete, interpreter

    Copyright © 1994-1998 Sun Microsystems, Inc.
    Copyright © 1995-1997 Roger E. Critchlow Jr.