This question is about dynamically adding code to contexts or objects in rebol 2, it is related to question Dynamically adding words to a context in REBOL but it is not the same kind.
If I want to dynamically add code to a rebol objects using its code block I got in trouble due to weird behaviour:
>> append third o [c: 3]
== [a: 1 b: 2 c: 3]
but...
>> first o
== [self a b]
>> second o
== [make object! [
a: 1
b: 2
] 1 2]
>> third o
== [a: 1 b: 2]
the append is missing! same if appending to first o
or second o
this do not occur using "common" blocks:
>> m: [a [b] c]
== [a [b] c]
>> append m 3
== [a [b] c 3]
>> m
== [a [b] c 3]
>> append second m 1
== [b 1]
>> m
== [a [b 1] c 3]
why is this?