Name

objName

objName method [arg...]

Invoke method method on object objName. Any arguments are passed as the argument list of the method. The method can be constructor, destructor, a method appearing in the class definition, or one of the built-in methods listed below.

objName cget -varName

Return the current value of public variable varName.

objName configure [-varname] [value]...

Provide access to public variables. With no arguments, return a list describing all public variables. Each element contains a variable name, its initial value, and its current value. With a single -varname option, return the same information for one variable. With one or more -varname -value pairs, set public variable varname to value value. Any configbody code associated with the variable is also executed.

objName isa className

Return true if className can be found in the object’s heritage; otherwise, return false.

objName info option [args...]

Return information about objName or its class definition. Accepts any of the arguments for the Tcl info command, as well as the following:

objName info class

Return the name of the most specific class for object objName.

objName info inherit

Return the list of base classes as they were defined in the inherit command, or an empty string if this class has no base classes.

objName info heritage

Return the current class name and the entire list of base classes in the order that they are traversed for member lookup and object destruction.

objName info function [cmdName] [-protection ...

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.