No registered users in community xowiki
in last 10 minutes
in last 10 minutes
Re: [Xotcl] Children object shadows parent objects method
From: Kristoffer Lawson <setok_at_fishpool.com>
Date: Wed, 22 Nov 2006 17:00:04 +0200 (EET)
On Wed, 22 Nov 2006, Kristoffer Lawson wrote:
> It's probably not desirable but if you think about it, you can see why that
> is happening. Objects are basically implemented as namespaces (well, at least
> they were at some point). A method is a proc inside a namespace. Thus a::name
> is the proc for that method. Now, objects are also commands. Placing it
> inside the namespace will create, well, the command a::name, thus overriding
> the method.
OK, I checked and the documentation does actually mention this behaviour
so I guess it is desired. Check:
http://media.wu-wien.ac.at/doc/tutorial.html#obj-agg
/ http://www.fishpool.com/~setok/
Date: Wed, 22 Nov 2006 17:00:04 +0200 (EET)
On Wed, 22 Nov 2006, Kristoffer Lawson wrote:
> It's probably not desirable but if you think about it, you can see why that
> is happening. Objects are basically implemented as namespaces (well, at least
> they were at some point). A method is a proc inside a namespace. Thus a::name
> is the proc for that method. Now, objects are also commands. Placing it
> inside the namespace will create, well, the command a::name, thus overriding
> the method.
OK, I checked and the documentation does actually mention this behaviour
so I guess it is desired. Check:
http://media.wu-wien.ac.at/doc/tutorial.html#obj-agg
/ http://www.fishpool.com/~setok/