[REBOL] Re: Executable code blocks as arguments
From: larry:ecotope at: 22-Aug-2001 10:46
Hi Tim The code block you pass in has to be bound to the objects context. Change your modify function like this: REBOL [] o: make object![ a: 1 b: 2 c: 3 modify: func[arg[block!]][do bind arg 'self] ]>> o/modify [a: "one" b: "two" c: "three"]== "three">> probe omake object! [ a: "one" b: "two" c: "three" modify: func [arg [block!]][do bind arg 'self] ] HTH -Larry