[Xotcl] Testing for execution inside object

Kristoffer Lawson setok at fishpool.com
Tue Oct 3 12:49:59 CEST 2006


I need to know if the current procedural context is inside a method  
(isntproc, proc, whatever) or not. What is the best way to do this? I  
used [self] to check by catching the error, but that doesn't work  
particularly well if another package happens to define the command  
[self]. Besides, I've never been fond of having to resort to error- 
catching to find out information (a bit like how people used to test  
for the existence of an array element with [catch]).

            /  http://www.fishpool.com/~setok/



More information about the Xotcl mailing list