Hi Robert!
[EMAIL PROTECTED] wrote:
>Hi, well this works but you have to keep the stuff in sync. So
>the problem isn't to put a name into an object but to refer to
>the Rebol-used-name of the object.
Objects in REBOL don't have names - they are just values that
can be assigned to words or referenced. Since they are assigned
by reference they can be associated with many names.
The solution by [EMAIL PROTECTED]:
Prototype: make object! [
construct: func [ new-name /local new-object ][
append myObjs new-object:
make self [ name: new-name ]
return new-object
]
name: ""
]
object: prototype/construct "name"
This puts a reference to the _actual_object_ in the myObjs
collection. You don't need to reference objects by name in
REBOL - you can reference them directly by reference.
Brian