CLASS
tcl.lang.Interp -- This manual contains Interp methods that associate user-specified data with the Interp.
METHODS
void setAssocData(String key, AssocData data)
void getAssocData(String key)
void deleteAssocData(String key)
OTHER METHODS
ARGUMENTS
DESCRIPTION
setAssocData
getAssocData
deleteAssocData
EQUIVALENT C FUNCTIONS
SEE ALSO
KEYWORDS

CLASS

tcl.lang.Interp -- This manual contains Interp methods that associate user-specified data with the Interp.

METHODS

void setAssocData(String key, AssocData data)

void getAssocData(String key)

void deleteAssocData(String key)

OTHER METHODS

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

ARGUMENTS

String key ()
A string, typically the name of the extension, by which the data can be accessed.

AssocData data ()
The instance of AssocData to associate with key.

DESCRIPTION

The following methods allow Java extensions to associate their own data with a Tcl interpreter. An association consists of a string key, typically the name of the extension, and an instance that implements the AssocData interface (See AssocData).

When the interpreter is disposed via the dispose() method, the disposeAssocData() methods of all the registered AssocData instances are called to perform the necessary clean up. Note that if an association is removed as a result of the setAssocData() or deleteAssocData() calls, the disposeAssocData() method of the removed AssocData instance is not called.

setAssocData
The setAssocData method creates the association between the string key and the AssocData instance, data. If an old association of the same key already exists, the old association is removed before the new association is created.

getAssocData
The getAssocData method returns the AssocData instance associated with key. If no such AssocData has been registered, null is returned.

deleteAssocData
The deleteAssocData method removes the association between the string key and the AssocData instance.

EQUIVALENT C FUNCTIONS

Tcl_SetAssocData, Tcl_GetAssocData, Tcl_DeleteAssocData

SEE ALSO

Interp, AssocData

KEYWORDS

association, data, deletion procedure, interpreter, key
Copyright © 1994-1998 Sun Microsystems, Inc.
Copyright © 1995-1997 Roger E. Critchlow Jr.