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

[REBOL] Re: 'context' related help needed

From: cyphre::volny::cz at: 16-Jul-2001 13:49

Hello Oldes ;-) For bindings word to specified context use 'BIND: USAGE: BIND words known-word /copy DESCRIPTION: Binds words to a specified context. BIND is a native value. ARGUMENTS: words -- A block of words or single word. (Type: block word) known-word -- A sample word from the target context. (Type: word) REFINEMENTS: /copy -- Deep copies block before binding it. And here is solution for your script: ----snip--- test-data: [make object! [ command: [my_fce 'other_data] ]] sys: make object! [ content: make object! [ my_fce: func[arg][print ["doing: " arg]] some_data: make object! [ command: [my_fce 'some_data] ] other_data: do test-data do-it: func[][ do some_data/command probe other_data do bind other_data/command 'other_data ] ] ] ----snip--- Have fun with Rebol! Cyphre