[Xotcl] XOTcl-next
Gustaf Neumann
neumann at wu-wien.ac.at
Fri Jan 4 13:19:43 CET 2008
Murr, Florian schrieb:
> Dear XOTcl-guys!
> The script below might illustrate another XOTcl bug.
>
Dear Florian,
That's not a bug. [info level 0] does not return the name of the method
in all situations, since "info level" is not xotcl-aware and is not touched
by the xotcl implementation. In situations, where - from the Tcl point
of view - the cmd "next" calls a method, "info level 0" returns "next".
There is nothing wrong about this.
> X instproc fun {w} { puts "[self] [info level 0]"; button $w.b;
> return $w.b }
>
In cases, where you want to output the name of the active method, use
XOTcl's callstack introspection with - in this case - "self proc". Change
your code as follows to obtain the method name in the outpt.
X instproc fun {w} {puts "[self] [self proc]"; button $w.b;
return $w.b }
best regards
-gustaf neumann
More information about the Xotcl
mailing list