View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] Even more [eval] woes

From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Tue, 14 Sep 2004 14:54:20 +0200

On Monday 06 September 2004 15:51, Kristoffer Lawson wrote:
> [self proc] inside a method that has been called inside an [ob eval] block
> gives the result "eval" inside of the method we're in.

 actually, i do not find it surprising, that "self proc" returns "eval", since
 self proc returns the topmost xotcl-method from the xotcl call stack.
 If one calls the XOTcl "eval" method, it performs the tcl-eval to
 execute (without the xotcl dispatcher) the presented tcl script.
 Therefore the xotcl stack is not aware of the actual tcl commands
 at and returns the topmost method, namely "eval".
 
 It looks to me that you can use [info level 0] instead, which operates
 on the tcl stack.

~/scripts> o proc p {} {puts [self]-p-[info level 0]}
~/scripts> o p
::o-p-p
~/scripts> o eval p
::o-p-p

> In practise this is now causing so many headaches I think I'm going to
> give up on doing this package using XOTcl that way. There appears to be no
> (working?) way to run a script within the 'context' of an object, in order
> to easily parse data which is formed in the style of a Tcl script. This is
> unfortunate as it would likely have offered clear performance benefits.

 If you have some some code, we can look at, we will certainly
 try to help with that.

-gustaf
>
> I may still try to do it directly with normal namespaces instead of XOTcl.
>
> / http://www.fishpool.com/~setok/
> _______________________________________________
> Xotcl mailing list - Xotcl_at_alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl

-- 
Univ.Prof. Dr.Gustaf Neumann
Abteilung für Wirtschaftsinformatik und Neue Medien
Wirtschaftsuniversität Wien, Augasse 2-6, 1090 Wien