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

[REBOL] callbacks

From: moliad:gmai:l at: 29-Oct-2007 18:33

hi guys, I have been trying to use callbacks today and well, its a totally random experience so far. my rebol func actually gets called, but its interface, how I spec it, is irrelevant... whatever I write nothing changes. I can even write a call-back spec which is empty, change the types, anything... the rebol func being called never reacts differently. anyone done anything with callbacks and can give me a few pointers? another strange issue, in some examples, I see callbacks defined like so: test: make routine! [ a [int] b [int] c [callback! [int int return: [int]]] return: [int] ] test-lib "test" but I get an error about the 'CALLBACK! word. If I replace it with 'CALLBACK then the error goes away, but what gets called in the actuall callback is oblivious to anything I write in the spec . indeed I can even add as many args in the rebol func and they just get pumped with random values (probably raw mem addresses). The other strange thing is, in my specific useage, the first and second value which get passed to the rebol func never change, and type also has nothing to do with routine spec nor function spec! help! I'm using the 2.7.5 view pro (almost the last unofficial release ;-) on windows -MAx