Livecode Wiki
Advertisement

Adds an existing group of objects to a card and sets the sharedBehavior property to true.

Built-in Message handler[]

Syntax:

place <group> onto <card>

Examples:

place group "Navigation" onto card "Navy" -- group is on current card
place background 1 onto this card -- group may be on any card

Use the place command to add an existing group to a card.

Only top-level groups may be placed onto multiple cards; an attempt to place a nested group onto another card throws an error.

Placing a group onto another card automatically sets the sharedBehavior property of the group to true.

Warning: If the group did not previously have the sharedBehavior property set to true, placing a group will (in addition) set its backgroundBehavior property to true. This is legacy behavior and will be removed in version 5.0. Scripts that rely on place setting backgroundBehavior to true for new groups should be updated to explicitly do so after the place command.

The words "group" and "background" are not always interchangeable. A group reference with the word "group" refers to a group on the current card. To refer to a group that's not on the current card, you must use the "background" form.

Tip: To have a group automatically placed on newly created cards, leave its backgroundBehavior property as true.

Parameters:

  • group: The group is any group in the current stack that is not contained(nested) in another group.
  • card: The card is any card in the current stack.

See also: copy (command), insert script (command), groupNames (property), sharedBehavior (property), backgroundBehavior (property),

Advertisement