View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] nested objects in nx

From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Wed, 27 Oct 2010 08:42:37 +0200

Not sure, what's wrong on your side.
i can't see a problem with this code,
and it works for me.

-gustaf

% Object create a
::a
% Object create a::b
::a::b
% a public method tst args {puts [self]};
::a::tst
% a::b public method tst args {puts [self]};
::a::b::tst
% a tst
::a
% a::b tst
::a::b
%


On 26.10.10 22:47, vitick_at_gmail.com wrote:
> I was reading the migration guide, and at the end it talk about the incompatibilities. I have specifically tested the "Calling objects like methods" and I do not understand it. It just doesn't work right.
> Example:
>
> Object create a;
> Object create a::b
>
> a public method tst args {puts [self]};
> a::b public method tst args {puts [self]};
>
> a tst; #works, returns ::a
> a::b tst; #error, invalid command self
>
> a::b eval self; #works, returns ::a::b
>
>
> Thanks
> _______________________________________________
> Xotcl mailing list
> Xotcl_at_alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl