tags:

views:

39

answers:

1
O: [a: 1 b: 2]
Protect 'O

does only protect O symbol not O/a. How do I also protect O/a ?

Thanks.

A: 

Well, your example doesn't actually use an object. It's just a block called O. So:

O: reduce [a: 1 b: 2]
protect [o a b] ; assuming you wanted to protect b as well

Now, if you wanted an actual object, you have to do it this way:

O: make object! [
    a: 1
    b: 2
    protect [a b]
]
protect 'O

R3 will have additional cool things you can do with PROTECT, like PROTECT/HIDE.

Gregory Higley