BYU Home pageBRIGHAM YOUNG UNIVERSITY
  Humanities Technology and Research Support Center
Back     CHum Revolution Gateway

Computers & the Humanities 210

Groups in Revolution

As mentioned before, a group is an object type that doesn't fit easily into one category because of its dual nature. Much like light that behaves like a wave and a particle, a group has properties that make it behave like a card at times and like a control object at others. Because of this the concept of groups can be difficult to grasp at first, but once mastered it is a very flexible and powerful tool.

Objectives

By the end of this reading you should be able to answer the following questions:

  1. What is a group in Revolution?
  2. How do you create a group?
  3. In what ways are groups like cards? In what ways are they like buttons and fields.
  4. What is unique about groups as compared to all other object types in Revolution?
  5. What does it mean to place a group on a card?
  6. Know the difference between removing a group and deleting a group.

Creating a Group

You can put objects into a group by selecting one or more objects already existing on the card and by choosing Group Selected from the Object menu (there is a button on the toolbar for this as well). This creates a new object within the stack called a group. When objects are grouped, ownership is taken away from the card they were on originally and is transferred to the new group. The group now "owns" the objects, though the group's objects remain visible and accessible on the card.

Grouped Objects versus objects on a card

The top image represents a card on which group 1 has been placed. (When a group is created on a card, the group is automatically placed on that card.)

 

 

The bottom image represents a card in the same stack that does not have the group placed on it.

 

In terms of inheritance, the new group exists as sort of a hybrid "sibling-child" of the existing cards. In other words, it is like a sibling because it is owned by the stack and maintains its identity independent of the card. A group is also like a card in that it can contain control objects. It is subject to all the nuances of inheritance: inheriting properties from the stack and passing on properties to the objects it owns. Changes made on the group level will be reflected in the objects that it owns. However, a group also behaves somewhat like a child to a card in that it inherits properties (e.g., text and color) from the card it is placed on, then passes those on to the objects it contains. Finally, a group has no visible presence in a stack unless it is placed on a card.

Since groups are objects, they can even be placed inside other groups (unlike cards). You can create a nested group simply by selecting a group and other objects you want grouped and then group them as described above. This group is now part of another group. While this may be somewhat nifty, it does create a level of complexity that we don't wish to explore right now.

Group Properties

 

Group Property Inspector

Just like all other objects in Revolution, groups have properties. The basic properties are similar to what you would find with fields and buttons. The group properties tab also shows us properties specific to groups. The most relevant properties are:

  • Hiliting one radio button at a time: For radio style buttons that are in a group, checking this box makes it so that only one button in the group can be highlighted at the same time. This option is only available if at least one radio button is contained within the group.
  • Can't delete: Prevents the group from being deleted from the stack. (This is a good safeguard against accidentally deleting a group.)
  • Behave like a background: Background behavior does two things:
    1. This group will be automatically placed on a new card if the group is present on the current card.
    2. Control messages from the card will be passed to the group. (We'll cover this in more depth when we talk about messages and scripting.)
    This is not the default setting for a group, so this must be selected in order for a group to placed automatically when a new card is created (per conditions explained above)

Placing a Group

A group object is unique among all object types in at least one respect: A group is the only object type that can be on more than one card at a time. Consequently, all the objects it owns are accessible from all cards on which the group is located. You can make a group accessible to more than one card in one of two ways:

  1. Go to the card you want the group to be on and choose the group from the Place Group menu item on the Object menu.
  2. Navigate to a card with the group already on it. Make sure the group's backgroundBehavior property is checked. Now create a new card by choosing New Card from the Object menu. Any groups on the current card with that property checked will automatically be placed on the new card.

Once you have created a group, the objects in the group can be placed on multiple cards (as discussed above). If the properties of the group are changed on one card, they are changed on all cards on which that group is found. There is one important exception to this rule:

This is arguably the most powerful function of groups: its ability to enable objects to exist simultaneously on several different cards. Not only does it save time in the creation process, but it engenders a sharp and consistent layout for your stack. It is a principal part of intelligent stack design.

Editing a Group Vs. Editing Objects in the Group

Despite being part of a group, the component parts of a group can be edited separately. To edit the components of a group, select the group and choose Edit Group from the Object menu. Now that you are in edit mode, you can click on individual objects in the group and edit them individually. The changes you make will be shown on all cards containing that group. Choose Stop Editing Group from the Object menu to return to the group selection. There are also buttons on the toolbar to accomplish the same ends.

Select Grouped IconYou can also edit items in a group without entering Edit Group mode. This can be important, for example, when you want to see the relationship of objects in the group with objects not in the group. By default, when you click on an object in a group in the Revolution development environment, the whole group is selected. However, you can change this behavior by choosing the Select Grouped Controls in the Edit menu or by clicking the Select Grouped icon on the tool bar. In this mode, clicking on an object in the group will only select the item clicked on, not the group. This allows you to edit each component of a group separately.

Ungrouping Items

If you have created a group and decide that you no longer want the objects to be together in this group, you can ungroup them. Simply select the group, go up to the Object menu and choose Ungroup Selected. This will delete the group from the stack and will place on the current card all the objects formerly within the group. (Note: Re-grouping the objects immediately, before moving from that card will restore the former group to all the cards on which it was placed.) Please note the implications of this: Since the group no longer exists, it will not display all those object on the cards where there were formerly visible. Ungroup items with caution.

Removing or Deleting a Group

Sometimes you want a group to show up on multiple cards in the stack, but not ALL the cards you create. Removing a group from a single card is simple. Choose Remove Group from the Object menu and the group will be removed from the current card only. Removing a group from every card in the stack does not remove it from the stack. It is still part of the stack and can be placed on a card by choosing the Place Group command in the Object menu.

To completely delete a group from the stack (and consequently all the objects it contains), select the group and hit the Delete key. You may also select the group and choose Cut Objects or Clear Objects from the Edit menu. A dialog box will appear asking you to confirm that you really want to delete the group. Clicking "Yes" will delete the group from all cards on which it is found and delete it from the stack as well. Please note that all objects contained within the group are obliterated as well. Again, use with caution.

Grouping Tasks


Back     CHum Revolution Gateway
Maintained by Devin Asay.
Copyright © 2005 Brigham Young University