Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[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 o
make object! [ a: "one" b: "two" c: "three" modify: func [arg [block!]][do bind arg 'self] ] HTH -Larry