scopedobject(1) | [incr Widgets] | scopedobject(1) |
scopedobject - Create and manipulate a scoped
scopedobject objName ?options?
None
Name: enterscopecommand: Command-Line Switch: -enterscopecommand
Name: enterscopecommand: Command-Line Switch: -enterscopecommand
The scopedobject command creates a base class for defining Itcl classes which posses scoped behavior like Tcl variables. The objects are only accessible within the procedure in which they are instantiated and are deleted when the procedure returns. This class was designed to be a general purpose base class for supporting scoped incr Tcl classes. The options include the execute a Tcl script command when an object enters and exits its scope.
The scopedobject command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the object. It has the following general form:
pathName option ?arg arg ...?
Option and the args determine the exact behavior of the command. The following commands are possible for scopedobject objects:
proc scopedobject_demo {} {
iwidgets::scopedobject #auto -exitscopecommand {puts "enter scopedobject_demo"} -exitscopecommand {puts "exit scopedobject_demo"}
}
scopedobject_demo
John A. Tucker
scopedobject, object
Tk |