[REBOL] Re: Business Object Versioning
From: sunandadh:aol at: 5-Apr-2002 6:34
Robert:
> I really would like to have object manipulation functions for 1, 2 and 3.
> Where
> 1 can be solved by short function;-)
I don't know any easy way. I had to do something similar when I wanted an
object that was made up of the differences between two other objects.
aa: make object! [a: 1 b: 2 c: 3]
bb: make object! [b: 2 a: 99 d: 4]
print mold ob-diff aa bb
make object! [a: 99 c: 3 d: 4]
I won't shame myself by published the highly hacked code -- which only works
for simple variables anyway -- but basically, I compare the two objects,
compose a block of differences, and then Do that block:
do [make object! [a: 2 c: 3 d: 4]]
You might try a similar technique to build a new object to replace your
original one,
Sunanda.