[Xotcl] Static member functions?

Gustaf Neumann neumann at wu-wien.ac.at
Thu Apr 17 13:08:50 CEST 2003


On Wednesday 16 April 2003 22:35, Michael A. Cleverly wrote:
> Very interesting.  But, I'm confused by the results I'm seeing (both
> before & after applying the patch).  It seems that even though [o1 test0]
> and [o1 test1] throw an error the variable is updated.  

 This is the semantics of variable traces in tcl (the trace is called afted the fact).
 It is possible to keep shadow-values of the variable contents and to restore
 the variable after a write operation to the original content, but my feeling was 
 that the purpose was rather trapping unwanted access than prohibiting it...
 
> And [o1 test3] does unset the variable.

 i mentioned that in the maybe cryptical sentence at the end of my last mail.
 the xotcl method unset uses the tcl c function Tcl_UnsetVar2. If unset
 triggers a trace, and the trace ends with an error, the error is not returned
 by the Tcl_UnsetVar2 command. This is different to the case of set, where
 Tcl_ObjSetVar2 returns the error. 

 I'll try to make a simple example and post it to c.l.t, let us see, what the 
 community thinks...

 best regards
-gustaf

-- 
Univ.Prof. Dr.Gustaf Neumann
Abteilung für Wirtschaftsinformatik
WU-Wien, Augasse 2-6, 1090 Wien



More information about the Xotcl mailing list