scripts of groups
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 125
- Joined: Sat Jan 31, 2009 12:01 am
scripts of groups
I wrote a script for a group of btns, but the script won't work unless it's in the objects of the group. I thought there was a checkbox for the groups property inspector that tells live code to run the group script v. object script. I guess I forgot. How do I tell live code to run the group script instead?
Re: scripts of groups
Hi Scott,
(or set the checkbox "behave like a background in the inspector)
Kind regards
Jean-Marc
I think you gave to set the backgroundbehavior of your group to trueI thought there was a checkbox for the groups property inspector that tells live code to run the group script v. object script. I guess I forgot. How do I tell live code to run the group script instead?
(or set the checkbox "behave like a background in the inspector)
Kind regards
Jean-Marc
https://alternatic.ch
Re: scripts of groups
Could we see the script of this group?
Re: scripts of groups
The incomplete story of groups and the message paths is this:
If you click on an object in the group, mouseUp and other messages are sent to the object. If it doesn't handle it or it passes the message, it goes to the group and then the card. If you click on the group outside of an object, the mouseUp is sent to the card. But, if the card is shared and has its background behavior set to true, then the message path is card and then group.
There might be some other things related to groups in groups.
I don't think this is exactly how it worked a few years back, but I can't be sure.
So, if you do not create a handler for (say) mouseUp in an object, then a handler for it in the group should work.
If you want to block the execution of the handler in the object, you can put an "opaque" object with a blend of 0% in the group in front of the objects. You might consider a frontScript, but that is scary.
You might be thinking of behaviors. Check those out.
If you click on an object in the group, mouseUp and other messages are sent to the object. If it doesn't handle it or it passes the message, it goes to the group and then the card. If you click on the group outside of an object, the mouseUp is sent to the card. But, if the card is shared and has its background behavior set to true, then the message path is card and then group.
There might be some other things related to groups in groups.
I don't think this is exactly how it worked a few years back, but I can't be sure.
So, if you do not create a handler for (say) mouseUp in an object, then a handler for it in the group should work.
If you want to block the execution of the handler in the object, you can put an "opaque" object with a blend of 0% in the group in front of the objects. You might consider a frontScript, but that is scary.
You might be thinking of behaviors. Check those out.