[REBOL] Re: Which? [Object! Block!]
From: cyphre:volny:cz at: 27-Sep-2001 12:30
Hi Andrew,
> I've found this helpful:
> object: make object! [x: 123]
> do bind [x: 10] in object 'self
> to execute code that should be in the object's context. For example:
>
> >> object: make object! [x: 123]
> >> do bind [x: 10] in object 'self
> == 10
> >> probe object
>
> make object! [
> x: 10
> ]
>
Yes, but this method just bind already defined words to specified context so
it is not for doing block of "universal" code:
>> object: make object! [x: 123]
>> do bind [e: 8] in object 'self
== 8
>> object/e
** Script Error: Invalid path value: e
** Where: halt-view
** Near: object/e
>> e
== 8
>>
Regards,
Cyphre