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

Re: [Xotcl] info method behaviour

From: Gustaf Neumann <>
Date: Mon, 13 Aug 2001 15:40:03 +0200

On Saturday 11 August 2001 00:00, Kristoffer Lawson wrote:
> Situation:
> I create a class "C" with instproc "foo".
> An object is created from C called "ob".
> Problem:
> The commands "ob info procs", "ob info args" and "ob info body" do not
> work as I would expect them to. In particular, there doesn't seem to be a
> way of finding out the body and arguments for the instproc "foo" from the
> object. I could do this by asking the class, but I specifically would
> like a uniform way to do this, without caring whether the methods are
> inherited or not. Is this intended? Why?

 Much of the answers have been said already.

 The right way to query instprocs is via "info instargs" and
 "info instbody" rather than "info args" and "info body" or
 the tcl counterparts...

> Class C
> C instproc foo {a b c} {puts foo}
> C c1
> C info instprocs
> C info instargs foo
a b c
> C info instbody foo
puts foo

 on our todo-list for 0.85 we have an issue for returning
 names of procs/instprocs/mixins/filters etc. in a consistent
 way, that also effects procsearch. This becomes neccessary
 for [self next], which lets a user query, what will be
 called next (filter, mixin, proc, instproc).

 in the best of all possible worlds, we treat whatever comes
 back fron the query an an object which has an orthogonal
 query interface for instrospection. speedwise an object
 is rather heavyweight, so we think about list notations
 as well. OTH, we the xotcl-objects are not necessarily
 tcl-based, these can be c-based as well (we have a mostly
 working SWIG bindig for xotcl), therefore the speed penalty
 wont be large....

PS: hopefully, i can put 0.85.3 this evening on the server.