[Xotcl] info method behaviour

Kristoffer Lawson setok at fishpool.com
Mon Aug 13 18:15:36 CEST 2001


On Mon, 13 Aug 2001, Gustaf Neumann wrote:

>  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?

Well for me even more important are the "info args" and "info body" parts.
As mentioned, I'm doing some meta-programming at the moment. I have a
method which generates more methods based on a template method (an
example of this can be found
at: http://mini.net/cgi-bin/wikit/401.html). Right now
the method-generators assumes that the template is inherited from a class
(so checks "args" and "body" from there), but really it should not care
whether a method is inherited or not. It should just be given the name of
the method, and it can ask the information regardless of inheritance.

I'm not quite sure what the best way to do this would be, while still
keeping the old logic. Maybe something like your "method" proposal, or
alternatively an extra option to the current "info body" etc. commands.

         -     ---------- = = ---------//--+
         |    /     Kristoffer Lawson      |  www.fishpool.fi|.com
         +-> |    setok at fishpool.com       |  - - --+------
             |-- Fishpool Creations Ltd - /         |
             +-------- = - - - = ---------      /~setok/




More information about the Xotcl mailing list