Metaclasses?
Michael van der Gulik
squeakml at gulik.co.nz
Wed Oct 13 22:32:44 UTC 2004
Hi all.
I'm getting confused. This is an actual problem I've come across in DPON
(my vapourware project).
Now, in DPON, objects can be replicated. E.g. a Symbol (like #me) can be
replicated. To do so, you need to implement
Symbol class>>replicationAlgorithm
to return the replication algorithm. Classes themselves also need to be
replicated. In that case, I implement
Symbol class>>replicationAlgorithm
but... then Metaclass>>replicationAlgorithm gets called. Fair enough...
a Metaclass is the class of a Class. But, in Squeak 3.7:
Symbol class = Metaclass (print it...)---> false.
and...
[Symbol class isKindOf: Class] ---> false.
[Metaclass isKindOf: Class] ---> true.
Hmm.. but if I inspect [Symbol class], I'm looking at Metaclass.
Could somebody explain this to me please?
Michael.
More information about the Squeak-dev
mailing list
|