[Xotcl] info method behaviour
Gustaf Neumann
neumann at wu-wien.ac.at
Mon Aug 13 16:20:09 CEST 2001
On Monday 13 August 2001 15:52, you wrote:
> On Mon, 13 Aug 2001, Gustaf Neumann wrote:
> > The right way to query instprocs is via "info instargs" and
> > "info instbody" rather than "info args" and "info body" or
> > the tcl counterparts...
>
> Well, as mentioned, this does not really work in my case. I do not know
> beforehand whether a proc is an instproc or a per-object proc. I am using
> meta-programming and using methods as templates for other dynamically
> built methods. When the API gets the name of the method, it asks for
> the body and arguments, so it can create another method with that
> information. When looking up that information it now assumes that the
> given method name is an instproc and asks the class -- but this is not
> a general solution.
>
> As pointed out by Artur, there are ways to do this, but they're pretty
> complex, so I am looking for a straightforward way of asking information
> about a method, without caring about whether it's inherited or not.
sure. the point is, that we need both: an explicit interface for getting
the details right and for distinguising as far as neccessary, and
a high level interface, that hides part of this details for a user who does
not care about these. for the latter case, an "info procs" or
"info instprocs" is not the right way, since the names are not necessarily
disjunct. a new thing called "info methods" that returns a list of
method-objects (see last mail) could help here returning all the callable
methods (which are procs, instprocs, mixins, filters).
what is it, that would fit your needs best? what are you doing exactly?
-gustaf
More information about the Xotcl
mailing list