Hi Giuseppe,
You're close; just don't confuse strings with words; they are not
interchangeable. With the latest releases, you can use strings in
paths, but they have to be in parens, so it's much easier just to use
words, or the get-word! syntax for indirection.
my-obj-proto: [
a: 1
b: 2
my-func: does [print "the value of 'a' is:" SELF/a]
]
my-obj-1: make object! my-obj-proto
my-obj-2: make my-obj-1 [a: 10 b: 20]
my-obj-3: make my-obj-1 [a: 100 b: 200]
my-array: reduce [
'position-1 my-obj-1
'position-2 my-obj-2
"position-3" my-obj-3
]
pos-3: "position-3"
my-array/position-1/my-func
my-array/position-2/my-func
my-array/("position-3")/my-func
my-array/:pos-3/my-func
HTH!
-- Gregg
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.