Send a message to all controls on a card
Ken Ray
kray at sonsothunder.com
Thu Sep 16 17:28:42 EDT 2004
On 9/16/04 11:53 AM, "Frank D. Engel, Jr." <fde101 at fjrhome.net> wrote:
> I am trying to send a message to all controls on the current card. I
> tried several things, ultimately ended up with this:
>
> repeat with c = 1 to the number of controls of this card
> send "moveControl" to control c of this card
> end repeat
>
> And it still doesn't work. Does anyone know how I can do this, or what
> might be wrong with the above code?
Frank, I don't know why this wouldn't work for you... I used a minor
variation of what you have and it worked for me. I created a card with three
buttons each with a different script to trap the message "hello".
I then coded the card script to say:
on doit
repeat with c = 1 to the number of controls of this card
send "hello" to control c of this card
end repeat
end doit
and then typed "doit" in the message box, and all three buttons responded
appropriately.
Perhaps there's something else getting in the way?
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the use-livecode
mailing list