On 20 Mar 2006, at 12:10, Koen Danckaert wrote:
Snit has a "myvar" method that returns the fully qualified name of a snit member variable. Perhaps something similiar (a method that returned a "reference" to an instance variable) would be useful in XOTcl?
I use the following two global procs for that:
proc myproc {args} {linsert $args 0 [uplevel 1 self]} proc myvar {var} {return [uplevel 1 self]::$var}
The procs are global (not instprocs on "Object") because otherwise I would have to write "my myvar" or "my myproc". Now I can simply use them in the following way inside xotcl (inst)procs:
Aren't you forgetting the [requireNamespace] from the above code?