[Xotcl] Re: [Xotcl] Classes and namespace
Kristoffer Lawson
setok@fishpool.com
Tue, 30 Jan 2001 16:06:39 +0200 (EET)
On Tue, 30 Jan 2001, Uwe Zdun wrote:
>
> XOTcl classes actually consist of two namespaces, one for the class object
> (where procs and class variable are defined) and one for the class features
> (where the instprocs are defined). The later one is "hidden" in the namespace
> "XOTclClasses". So during execution of the "init" method the current namespace
> is:
OK, I understand that now and see how it's problematic. However it's
still somehow confusing from the developer's point of view that what
syntactically appears to be in the same namespace isn't (not your
fault, I know :-). I really can't see any way round it, though... ?
In any case, an [info ns] command might be clearer in this case
than [info parent] -- even though they give the same result. parent
would seem to refer more to the parent object and without an idea of
the internal workings one doesn't necessarily know that it is valid
in the place of [info ns]. Ie. [info ns] would give the namespace where
the object was defined in. Actually this would work for child objects
as well. Then the result would differ from [info parent]. Would
that make sense?
- ---------- = = ---------//--+
| / Kristoffer Lawson | www.fishpool.fi|.com
+-> | setok@fishpool.com | - - --+------
|-- Fishpool Creations Ltd - / |
+-------- = - - - = --------- /~setok/