Newbie question

Devin Asay devin_asay at byu.edu
Tue May 4 11:19:08 EDT 2010


On May 4, 2010, at 8:30 AM, Steve Jones wrote:

> Fairly new to RR here, but have used HyperCard and then SuperCard at the amateur level for a while.
> 
> I see in RR that you put items in GROUPS to have them appear on every card in a stack as opposed to SC where you put them in the BACKGROUND.  I have a GROUP of items on a single card in a stack.  When the CREATE CARD command is issued in a handler, a new card is created but the GROUP is not on it.  What might I be doing wrong?

Others have answered your basic question, but I can add that the concept of groups in Rev is simultaneously one of the more useful things in Rev, while at the same time one of the hardest cognitive shifts for people moving to Rev from HyperCard or SuperCard. I think that's because in Rev, groups are far more than just a replacement for backgrounds. When I introduce groups in my Rev class I tell my students that there are two main reasons for using groups:

1. To associate several controls into a single group for ease of formatting or rearranging your layout; or because the controls need to interact in some way. For example, if you want to have a set of radio-style buttons, which let the user make “mutually-exclusive” choices, you need to group them. When you do that, Rev will automatically un-highlight previously highlighted buttons in the group.

2. To place the same controls on multiple cards. Often, for example, you may want to have buttons on every card of your stack that allow you to go to the next and previous cards in the stack. In cases like these, it is best to create the Previous/Next buttons on a card, group them, then place the group on all of the cards in the stack. The main advantage of this approach are obvious: if you have buttons that do the same thing on each card, and you use a group, the buttons stay in the same location on each card, have the same appearance on each card, and if you have to make a change to a button, you only have to do it once, instead of once for every card in the stack.

Groups can appear only on one card, or can be placed on as many cards as you want, by using "Place Group" from the Object menu. Once you manually place a group on more than one card, Revolution automatically considers it a background, and its backgroundBehavior property is automatically set to true. If you are not aware of this quirk, it can cause unexpected consequences.

If you want to read more, see http://revolution.byu.edu/groups/Groups.php

When I first switched to Rev from HC, I was completely confused by groups. Once I got my head around the concept and figured out how they worked, I was sold and would never go back to just card layer vs. background layer.

Anyway, welcome to the revolution. Hope this is useful.

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list