{Spam?} Data conversion using #primitiveChangeClassTo: with GOODS

Yar Hwee Boon hboon at motionobj.com
Sun Nov 28 10:35:49 UTC 2004


I'm trying to convert some objects that is stored in GOODS to their  
subclass, but I'm not sure why its not working. Could anyone have a look?  
File in the attached and run the code below. How should I do this instead?  
Thanks.

======
db := KKDatabase onHost: 'localhost' port: 6102.
a := AA new.
a list add: BB new.
db root at: #xxx put: a.
db commit.

x := (db root at:#xxx).
"x list do: [:e | e primitiveChangeClassTo: BBSubclass new]."
x list: (OrderedCollection with: (x list do: [:e | e  
primitiveChangeClassTo: BBSubclass new])).
"x inspect"
db commit.

db := KKDatabase onHost: 'localhost' port: 6102.
(db root at:#xxx) inspect
======

-- 
Regards
HweeBoon
MotionObj



More information about the Squeak-dev mailing list