[REBOL] Re: Object Sea - Work in Progress
From: rotenca:telvia:it at: 21-Feb-2002 16:26
Hi Carl Read
> Anyway, I'm not too sure, (well, haven't a clue:), what you're trying
> to do, but I've been storing and receiving REBOL objects by just
> saving the objects then loading and do-ing them to get them back to
> their original state. ie...
I do not know his goal, but look at this:
>> a: context [b: context [c: none]]
>> a/b/c: a/b
>> do load mold a ;it is like save and load
** Script Error: ... has no value
** Near: ...
Why?
>> print mold load mold a
[
make object! [
b:
make object! [
c:
make object! [...]
]
]
]
Reflexions become [...] but Load can't understand them obviously.
Your code (save + load) works only for object without any reflexions.
It is good also for small object collections: think to an object of 1000
item, with 5 internal references for every object, and save will create a
50.000 "make object []" stuff. Too much overhead, i think.
A good function to save and load complex objects tree is welcome.
---
Ciao
Romano