Help please: can't get behavior script to work

Ian McKnight iangmcknight at
Sat Oct 23 07:19:18 EDT 2010


I have a number of buttons which are grouped together, and then this group
is grouped with other similar groups to form a super-group. I have in excess
of 300 buttons then that each represent a date. When I put the mouse over
any one of the buttons I want to access an array and display the relevant
information for that day in a separate field. I have a mouseWithin handler
to access the data.

When the mouseWithin handler is in the script of the actual button all works
as it should.

When I move the script to a separate button and set the behavior of my
original button to it - nothing happens. The Inspector shows the behavior
location correctly.

There are no other mouseWithin handlers in the message path.

This is the line I used in the message box to set the behavior of the first
of my buttons.

set the behavior of btn "checkBx 0" of grp "sepGrp" of cd "calendar" to the
long id of btn "behave" of cd "calendar"

I even tried referencing all the groups but still nothing happened.

set the behavior of btn "checkBx 0" of grp "sepGrp" of grp "calendargrp" of
cd "calendar" to the long id of btn "behave" of cd "calendar"

This is the corresponding behavior entry from the Inspector

button id 1647 of stack "timeTable3"

which resolves to the button with my mousewithin script.

I can strip out the core of the script into a separate handler and place it
in the card script but I'd rather not replicate the remaining code 300+
times (even though it is only a dozen lines) if I can get behaviors to work.

I'm using LiveCode 4.5 Bld 1080

Can anyone suggest what I'm doing wrong?



Ian McKnight

iangmcknight at

More information about the Use-livecode mailing list