oo::define , a built-in Tcl command, defines and changes the definition of existing classes in TclOO.
If given as a sequence of args, the definitionScript is created by making a list of those arguments and evaluating that as if it was given as a definitionScript. Supported definitions for use in the definitionScript are:
my can be used as the command name:
oo::objdefine myobject forward method2 my method1
PYK 2017-12-12:
The act of creating a new method resets the current export setting for the method. In the following example, it is necessary to use export twice in order for the invocation of .~ to succeed.
oo::class create c1 { method .~ {} { puts {c1 method} } export .~ } oo::class create c2 { superclass c1 method .~ {} { puts {c2 method} } export .~ } c2 create obj1 obj1 .~