Page 1 of 1

calling handlers/scripts from one stack to the other

Posted: Fri Dec 14, 2007 5:15 pm
by no1g8tor
I am learning RunRev quickly, but I ran into a road block.

I have several stacks as part of my project and when its finished only the main stacks cards or "windows" will be dispalyed and the other stacks will just hold data and scripts.

My question is. How can I call a script or handler on a card script from another stack from the main stack.

Example of what I tried and no luck...

I put a button on my main stack that opened up the sub-stack and went to the card I needed and then I put in the name of the handler on the card script, but I get "Cant find Handler" error.

Also, If I do have to open the card and stack, I don't want to be able to see the card, Only the main stack.

Thanks so much in advance

Posted: Sat Dec 15, 2007 12:00 am
by malte
Hi no1g8tor,

quite a few options here. :)

Look up send and call in the dictionary. You might also want to make your stck a library or backscript.

examples:

send "myMessage" to cd "myCard" of stack "mySubstack"
-- sends a meesage to that card

start using stack "mySubstack2"
-- the stackscript of the substack is inserted into the messagepath and all scripts contained in the substacks stack script are available

put the script of button "myButton" of stack "mySubstack3" into back
-- almost the same as start using, but for any control, card or stack

Hope that helps,

Malte