[REBOL] Re: Private words in objects?
From: tim-johnsons:web at: 5-Jul-2006 7:19
* Ladislav Mecir <lmecir-mbox.vol.cz> [060705 00:09]:
> >
> For protected variables see the PROTECT function.
Hi Ladislav: I've never been able to make protect operate on
a context or a member of a context:
see console session below:
>> help protect
USAGE:
PROTECT value
DESCRIPTION:
Protect a word or block to prevent from being modified.
PROTECT is a native value.
ARGUMENTS:
value -- The word or block of words to be protected (Type: word block)
>> d: context[a: 1]
>> protect 'd
>> d/a: 2
== 2
>> probe d
make object! [
a: 2
]
>> protect in d 'a
>> d/a: 3
== 3
>> probe d
make object! [
a: 3
]
>> ;; Doesn't work!!
>> protect d/a
** Script Error: protect expected value argument of type: word block
** Near: protect d/a
tim
--
Tim Johnson <tim-johnsons-web.com>
http://www.alaska-internet-solutions.com