[REBOL] Re: Which? [Object! Block!]
From: al:bri:xtra at: 27-Sep-2001 21:13
Cyphre wrote:
> Another feature what I'm missing when working is DOing some code in
specified context since Rebol's current DO does the code always in global
context. Maybe something like "do in a [x: 10]" should be useful...
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
]
I hope that helps!
Andrew Martin
Writing Rebol code while waiting for 21.5MB of silly program to download...
ICQ: 26227169 http://zen.scripterz.org