Accessing handler on another card in stack

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bruceBUSXpd
Posts: 6
Joined: Tue Jan 08, 2013 12:36 am

Accessing handler on another card in stack

Post by bruceBUSXpd » Thu Feb 14, 2013 7:57 pm

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

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Accessing handler on another card in stack

Post by Dixie » Thu Feb 14, 2013 8:40 pm

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

bruceBUSXpd
Posts: 6
Joined: Tue Jan 08, 2013 12:36 am

Re: Accessing handler on another card in stack

Post by bruceBUSXpd » Thu Feb 14, 2013 9:01 pm

Understood!

Works perfectly now.

Thanks Dixie :-)

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Accessing handler on another card in stack

Post by Klaus » Thu Feb 14, 2013 9:08 pm

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

Post Reply