Re: Activating a Function in a Different Stack

2006-10-31 Thread Dave
Opps! A typeo got into it! Should be: 1. Do this: function CalledFromDiffStack(p1,p2,p3) -- This refers to the stack etc. that called this one put CalledFromThisStack(p1,p2,p3) into myValue return myValue end CalledFromDiffStack function CalledFromThisStack(p1,p2,p3) -- this refers to the

Re: Activating a Function in a Different Stack

2006-10-31 Thread Dave
Hi, You have to be careful about using "this" as as in "this stack", "this card", etc. There are a number of ways around it: 1. Do this: function CalledFromDiffStack -- This refers to the stack etc. that called this one put CalledFromThisStack into myValue end CalledFromDiffStack funct

Re: Activating a Function in a Different Stack

2006-10-30 Thread Bridger Maxwell
Wow, thanks for the great response everyone. I tried a few and I found that the value function works the best. I had actually been using virtual properties in a few places instead of functions, but the problem then was that I couldn't pass parameters to them. Here is the final script: put "

Re: Activating a Function in a Different Stack

2006-10-30 Thread Dar Scott
On Oct 30, 2006, at 12:51 PM, Ken Ray wrote: Never mind. It is in parameters where that does not work. Ah, but using pass-by-reference parameters DOES work: But you can't use pass-by-reference with send. Dar ___ use-revolution mailing list us

Re: Activating a Function in a Different Stack

2006-10-30 Thread Ken Ray
On 10/29/06 7:13 PM, "Marielle Lange" <[EMAIL PROTECTED]> wrote: >> Never mind. It is in parameters where that does not work. Ah, but using pass-by-reference parameters DOES work: on mouseUp put "1" into tTest[1] put "2" into tTest[2] updateArray tTest combine tTest using cr put tTest

Re: Activating a Function in a Different Stack

2006-10-29 Thread J. Landman Gay
Dar Scott wrote: I'm not sure, but I think 'the result' is set to empty at the _start_ of handlers and of some built-in functions and commands. Lots of built-in commands and functions set the result, and those will replace any current value immediately. Otherwise, the docs say the result is

Re: Activating a Function in a Different Stack

2006-10-29 Thread Dar Scott
On Oct 29, 2006, at 6:13 PM, Marielle Lange wrote: What is exactly the scope of this "the result"? According to the doc: "The result function is set to empty when the current handler finishes executing." I have tried grabbing 'the result' in logging functions, but found I needed to pass i

Re: Activating a Function in a Different Stack

2006-10-29 Thread Marielle Lange
Note that the post has now been archived on the code website: ... with code coloring. Enjoy, Marielle ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe

Re: Activating a Function in a Different Stack

2006-10-29 Thread Marielle Lange
Never mind. It is in parameters where that does not work. You are right. This works: on mouseup put "1" into aTest[1] put "2" into aTest[2] get return_array(aTest) put the result into aResult combine aResult using cr answer aResult end mouseup function return_arr

Re: Activating a Function in a Different Stack

2006-10-29 Thread Dar Scott
On Oct 29, 2006, at 4:42 PM, Dar Scott wrote: On Oct 29, 2006, at 4:35 PM, Marielle Lange wrote: Tadam... 1 2 3 4 Yikes! I was sure that didn't work! Never mind. It is in parameters where that does not work. Dar ___ use-revolution mailing lis

Re: Activating a Function in a Different Stack

2006-10-29 Thread Dar Scott
On Oct 29, 2006, at 4:35 PM, Marielle Lange wrote: Tadam... 1 2 3 4 Yikes! I was sure that didn't work! Dar ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscriptio

Re: Activating a Function in a Different Stack

2006-10-29 Thread Marielle Lange
I think there is a shortcut. You can use 'the result' for other than errors for custom commands. I would bet you are right. But, but.. this could let us pass an array back to the calling script. Let's try. Stack A - on mouseup send doSomething to button 1 of stack "stackB" put

Re: Activating a Function in a Different Stack

2006-10-29 Thread Dar Scott
On Oct 29, 2006, at 3:07 PM, Marielle Lange wrote: Stack A - on mouseup send doSomething to stack "stackB" wait 1 tick (in case of, I believe that's not needed but I tend to add it) put the handlername_result of stack "stackB" into tResult. <--- readi

Re: Activating a Function in a Different Stack

2006-10-29 Thread Marielle Lange
Is it possible to activate a function that resides in one stack, and get the result from a different stack? It is possible, --- A. The send equivalen

Re: Activating a Function in a Different Stack

2006-10-29 Thread Dar Scott
On Oct 29, 2006, at 9:49 AM, Bridger Maxwell wrote: Is there a "send" equivalent for functions? Consider 'value()'. You can specify an object. (But this will not work on functions that return arrays, if you specify the object.) Dar ___ use-rev

Re: Activating a Function in a Different Stack

2006-10-29 Thread Mark Smith
The only really convenient way to use functions in other stacks is to put those other stacks 'in use', so that their scripts are in the message path. I'm not very clear on which stack is requesting what from where, but it sounds like you're loading a stack into a local machines memory fro

Activating a Function in a Different Stack

2006-10-29 Thread Richmond Mathewson
"Right now I have it set up so that Stack A gets a request for info from stack B over the Internet. " Well, you could set things up so that Stack A uses 'put' to deliver the requested data into a field in Stack B - lets call it "RecData". At the end of the script in Stack B requesting data from S

Activating a Function in a Different Stack

2006-10-29 Thread Bridger Maxwell
Hey, Is it possible to activate a function that resides in one stack, and get the result from a different stack? Right now I have it set up so that Stack A gets a request for info from stack B over the Internet. Lets pretend that the request is "the background color of this stack". It puts tha