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

[REBOL] Troube Calling Function within Object

From: cribbsj::oakwood::org at: 28-Nov-2000 14:02

I hope someone can help me with this one 'cause I have been wrestling with it for two days and I'm about to tear out what little hair I have left! Let's say I have an object called player. Within that object I have created a function called find-records. find-records expects a block to be passed to it as an argument. My problem is this: I want to call this function using the value of a variable called table and return the value to a higher calling function. So far, I have gotten this to work: return player/find-records next request (request is the block I want to pass, excluding the first value). Now, let's say I do this: table: "player" How do I call the function now? I have tried about a million different variations of: return to-word to-path reduce [table 'find-records] next request (I use return here because I am calling this line from a higher level function and I want to return the value). But nothing seems to work! Sometimes, it appears I was able to actually call the function within the object, but then the argument won't get passed. Sometimes, I think I got the function to be called WITH the arguments, but I can't get the return value from the function to be returned by this line. I have read and re-read the parts in the manual dealing with words, functions, evalution, etc. and I just can't find what I am doing wrong. I can email my script to anyone who needs to see it. I appreciate any help that can be given. Jamey Cribbs