On Sun, 28 Nov 2004 11:40:36 +0100, Avi Bryant avi.bryant@gmail.com wrote:
On Sun, 28 Nov 2004 18:35:49 +0800, Yar Hwee Boon hboon@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.