Page 1 of 1

Accessing handler on another card in stack

Posted: Thu Feb 14, 2013 7:57 pm
by bruceBUSXpd
Hi Guys,

I have the following code on one card, it works great :

Code: Select all

on mouseUp
trueBtnOne
end mouseUp

on trueBtnOne
   hide button Check2T
   hide button Check2F
   ...
end trueBtnOne
BUT, If I separate them onto two cards, it throws an error :

Card 1.

Code: Select all

on mouseUp
trueBtnOne
end mouseUp

Card 2.

Code: Select all

on trueBtnOne
   hide button Check2T
   hide button Check2F
   ...
end trueBtnOne
I get the following error :

(Handler: Can't find handler) near trueBtnOne

It is the same code, just separated over two cards, what have I missed here... I've gone through the forum looking for answers, but I am still stumped...
Help appreciated!

Cheers,
Bruce

Re: Accessing handler on another card in stack

Posted: Thu Feb 14, 2013 8:40 pm
by Dixie
Bruce...

Put the 'trueBtnOne' handler into the stack script... that will help..:-)
Now, read about the message path starting p.127 in the 'User Guide'.

Dixie

Re: Accessing handler on another card in stack

Posted: Thu Feb 14, 2013 9:01 pm
by bruceBUSXpd
Understood!

Works perfectly now.

Thanks Dixie :-)

Re: Accessing handler on another card in stack

Posted: Thu Feb 14, 2013 9:08 pm
by Klaus
Hi Bruce,

here a good read about the Livecode "message path":
http://www.fourthworld.com/embassy/arti ... _path.html
Very efficient if used correctly!

Ah, and welcome to the forum! :D


Best

Klaus