Still looking for an official explanation for the operations of [eval] (and other stuff I posted), but here's another one. The code follows:
package require XOTcl 1.3 namespace import xotcl::*
Class Foo -parameter doors
Foo instproc init {req} { puts $req }
Object ob
set newOb [Foo new -childof ob hello -doors 4] puts "Doors: [$newOb doors]"
$newOb proc doStuff {} { puts "class: [self class]" set newOb [[self class] new -childof [self] whatevah -doors 3] puts "Doors: [$newOb doors]" }
$newOb doStuff
#$newOb eval { # doStuff #}
This version correctly states that the class for [self class] is an empty string. However, if I comment out the "eval" version and use it instead, [self class] gives me "::xotcl::Object".