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

[Xotcl] info classchildren leads to a segfault

From: Michael A. Cleverly <michael_at_cleverly.com>
Date: Thu, 17 Apr 2003 12:11:20 -0600 (MDT)

Since every class is also an object, its possible to define both procs &
instprocs for it. The instprocs define methods that objects of this class
will have, while the proc (as I understand it) proc would define a method
on the class object, but not for objects of the class. (Yes?)

However, during my interactive playing around trying different things I've
found that as soon as I define a proc on the class object any subsequent
use of [info classchildren] leads to a segfault.

$ tclsh
% package require XOTcl
1.0
% namespace import xotcl::*
% Class C
::C
% C info classchildren
% C proc foo args {}
% C info classchildren
Segmentation fault

Is it better to avoid defining procs on the class object, or am I
misunderstanding when & where to use [info classchildren]?

Michael