Name: newBackground

Type: message

Syntax: newBackground

Summary:
Sent to a new <group> right after it's created.

Associations: group

Introduced: 1.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Description:
Handle the <newBackground> message if you want to create
<object|objects> or do other tasks when a new <group> is created.

Normally, the <newBackground> <message> is handled at a higher level of
the <message path>, since the newly created <group> does not yet have a
<script> unless the <templateGroup> contains one.

The actual creation is not triggered by the <newBackground> <message>,
so <trap|trapping> the <message> and not allowing it to <pass> does not
prevent the <group> from being created.

A <newGroup> <message> is sent before the <newBackground> <message>.
(The <newBackground> <message> is included for compatibility with
<HyperCard>.) 

References: copy (command), group (command), pass (control structure),
object (glossary), trap (glossary), message (glossary),
HyperCard (glossary), message path (glossary), templateGroup (keyword),
openBackground (message), newGroup (message), newCard (message),
script (property)

Tags: objects

