{Spam?} Re: {Spam?} Data conversion using #primitiveChangeClassTo:
with GOODS
Yar Hwee Boon
hboon at motionobj.com
Sun Nov 28 10:46:20 UTC 2004
On Sun, 28 Nov 2004 11:40:36 +0100, Avi Bryant <avi.bryant at gmail.com>
wrote:
> On Sun, 28 Nov 2004 18:35:49 +0800, Yar Hwee Boon <hboon at motionobj.com>
> wrote:
> Read the comment on #primitiveChangeClassTo:. In particular, "Note:
> The primitive will fail in most cases that you think might work. ".
I did. The primitive did not fail actually. In the middle of the workspace
code I pasted, if you uncomment the #inspect call. You will find that the
list element is properly converted. But the #inspect at the last line
after committing shows that the list has not been updated in the database.
I was guessing that I might be the GOODS client code?
> If you really need to do this, #become: will work better (ie,
> something like "a become: (BB basicNew copyFrom: a)"), though it's
> slow if you use it on individual objects rather than with a bulk
> #elementsExchangeIdentityWith:.
I'll try this, thanks.
--
Regards
HweeBoon
MotionObj
More information about the Squeak-dev
mailing list
|