No registered users in community xowiki
in last 10 minutes
in last 10 minutes
[Xotcl] Re: [Xotcl] Real value of meta-class
From: Kristoffer Lawson <setok_at_fishpool.com>
Date: Mon, 29 Jan 2001 20:18:50 +0200 (EET)
On Mon, 29 Jan 2001, Rick Hedin wrote:
>
> Is there an example where being a metaclass results in different output?
I'm not sure if the question is how metaclasses can be used? Personally
I've been thinking of a package that would transparently allow XOTcl
coders to use ITcl classes as if they were XOTcl classes. For that I would
use a metaclass ITclClass. When creating a clas with that like
ITclClass Foobar
It would search for the actual ITcl class called "Foobar", create an XOTcl
class "Foobar" with a filter installed that redirects everything to the
original ITcl class, and if instantiated does the appropriate work
for the object.
You could probably do this with mixins, but I don't think it would be
as beautiful.
I'm sure others have some interesting uses as well ;-)
- ---------- = = ---------//--+
| / Kristoffer Lawson | www.fishpool.fi|.com
+-> | setok_at_fishpool.com | - - --+------
|-- Fishpool Creations Ltd - / |
+-------- = - - - = --------- /~setok/
Date: Mon, 29 Jan 2001 20:18:50 +0200 (EET)
On Mon, 29 Jan 2001, Rick Hedin wrote:
>
> Is there an example where being a metaclass results in different output?
I'm not sure if the question is how metaclasses can be used? Personally
I've been thinking of a package that would transparently allow XOTcl
coders to use ITcl classes as if they were XOTcl classes. For that I would
use a metaclass ITclClass. When creating a clas with that like
ITclClass Foobar
It would search for the actual ITcl class called "Foobar", create an XOTcl
class "Foobar" with a filter installed that redirects everything to the
original ITcl class, and if instantiated does the appropriate work
for the object.
You could probably do this with mixins, but I don't think it would be
as beautiful.
I'm sure others have some interesting uses as well ;-)
- ---------- = = ---------//--+
| / Kristoffer Lawson | www.fishpool.fi|.com
+-> | setok_at_fishpool.com | - - --+------
|-- Fishpool Creations Ltd - / |
+-------- = - - - = --------- /~setok/