[Xotcl] info method behaviour

Zoran Vasiljevic zoran@archiware.com
Sat, 11 Aug 2001 14:31:34 +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?
>
>

You can do this pretty easy with:

% [ob info class] info instprocs

... and similar.

AFAIK, the "ob info procs|args|body" is ment to be used
with per-object resources (procs), like for example:

% ob proc bar args {puts $args}
% ob info procs
bar
% ob info body bar
puts $args
% ob info args bar
args

If you change the current behaviour, how would you
cover this issue then ?


Regards,
Zoran