Behaviors

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Behaviors

Post by maxs » Mon Sep 29, 2014 3:53 am

Where can I see an example of a behavior button that works?

I can't get mine to work.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Behaviors

Post by Simon » Mon Sep 29, 2014 5:47 am

Hi maxs,
Check the script of btn Follower
Nuthin in it right, but an empty on mouseUp
But press it.

Now change the answer in btn Leader
What happens now when you press btn Follower?

In the inspector of btn Follower check out the behavior box.

Simon
Attachments
leadIt.zip
LC 6.6.1
(494 Bytes) Downloaded 169 times
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Re: Behaviors

Post by maxs » Mon Sep 29, 2014 6:46 am

Hurray

It works. Thanks Simon.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Behaviors

Post by Simon » Mon Sep 29, 2014 7:13 am

Hi maxs,
It gets way crazier then the example I posted.
Button Leader can have it's behavior set to another btn, and they all follow the... ummm leaders leader.
And btn Leader can be applied to other controls.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Behaviors

Post by FourthWorld » Mon Sep 29, 2014 2:29 pm

...and you can reassign behaviors at runtime if you need to.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply