[Xotcl] info method behaviour
Zoran Vasiljevic
zoran at archiware.com
Sun Aug 12 17:37:42 CEST 2001
On Saturday 11 August 2001 23:07, Kristoffer Lawson wrote:
> > AFAIK, the "ob info procs|args|body" is ment to be used
> > with per-object resources (procs), like for example:
>
> Yes, that what it appears to do, but as such it's limited. I would like
> a uniform way of asking information about inherited procs and per-instance
> procs. In fact I might even say that to separate those on this level is
> confusing the object model.
>
I do understand now what you mean.
You'd like a general introspection
interface, w/o needing to know wether
you're dealing with a per-instance
proc or an instproc. Seems logical.
So you'd say:
ob info body foo
ob info body bar
or
ob info args foo
ob info args bar
without extra knowledge about what are
"foo" and "bar" actually.
The "foo" may be an instproc whereas
the "bar" may be a per-instance proc
or vice versa. Correct?
I think such behaviour can be implemented
with some XOTcl wrappers using existing
introspection capabilities of the system.
I might be wrong of course. Maybe Uwe and/or
Gustaf can say something about it?
I would, for example, override the "info"
method with some custom code which tries
the per-instance proc first and if it does
not find any, goes to the instproc.
This should't be difficult to implement.
Cheers
Zoran
More information about the Xotcl
mailing list