[Xotcl] Asserts off/on

Kristoffer Lawson setok at fishpool.com
Sat Jul 15 16:46:25 CEST 2006

On 15 Jul 2006, at 17:21, Gustaf Neumann wrote:

> Kristoffer Lawson schrieb:
>> Except that this only works 'afterwards'. So it doesn't actually  
>> help, as I'd still have to apply it after I create objects etc.
> i thought you want to turn on checking for all objects (which means  
> existing objects).
>> when really I just want to turn it on at the top of the  
>> application and leave it at that.
>> For the moment I managed this with a filter that is called every  
>> time an object is initialised, but I would imagine this the kind  
>> of thing that should be handled elegantly by the XOTcl core?
> Why a filter?

Hm, well, it was the first thing that came to mind :-) And easy to do  

> in order to turn an checking for objects as you create these, you  
> might
> use something like the following:
>   Object instmixin [Class new -instproc init args {my check all;  
> next}]

Yeah, giving that some thought, that should work too.

But would it be useful to have this kind of functionality in the core  

Something like:

Class instcheck all

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

More information about the Xotcl mailing list