% package require XOTcl 1.3 % xotcl::Class Foo ::Foo % Foo instproc bar {a} {puts $a} % Foo ob ::ob % ob info args bar % ob info body bar
Or have I misunderstood something about what should be going on? I would assume args to return 'a' and body to return 'puts $a'?
Do they only work on procs? Does that not slightly go against the 'slot' idea?
Am Donnerstag, 2. September 2004 20:55 schrieb Kristoffer Lawson:
% package require XOTcl 1.3 % xotcl::Class Foo
::Foo
% Foo instproc bar {a} {puts $a} % Foo ob
::ob
% ob info args bar % ob info body bar
Or have I misunderstood something about what should be going on? I would assume args to return 'a' and body to return 'puts $a'?
Do they only work on procs? Does that not slightly go against the 'slot' idea?
Please use Foo info instargs bar Foo info instbody bar
ob info args bar works only for procs (procs owned by object ob)
master of introspection Artur Trzewik
On Thu, 2 Sep 2004, Artur Trzewik wrote:
Am Donnerstag, 2. September 2004 20:55 schrieb Kristoffer Lawson:
% package require XOTcl 1.3 % xotcl::Class Foo
::Foo
% Foo instproc bar {a} {puts $a} % Foo ob
::ob
% ob info args bar % ob info body bar
Or have I misunderstood something about what should be going on? I would assume args to return 'a' and body to return 'puts $a'?
Do they only work on procs? Does that not slightly go against the 'slot' idea?
Please use Foo info instargs bar Foo info instbody bar
ob info args bar works only for procs (procs owned by object ob)
Yes, I found those things, but the documentation talks about methods. To me, methods mean everything. If it only means procs (not instprocs), I think it should be really clear about that.
I'm not even sure if it's a good idea that it only means object procs.
On Thursday 02 September 2004 21:52, Kristoffer Lawson wrote:
Yes, I found those things, but the documentation talks about methods. To me, methods mean everything. If it only means procs (not instprocs), I think it should be really clear about that.
i made the documentation (tutorial and langref) more precise on this. Btw, "info instdefault" was missing in the tutorial, while "info default" was in there.
I'm not even sure if it's a good idea that it only means object procs.
since the obj procs and instprocs of various classes are allowed to have different signatures, it is required to query these separately.
-gustaf