SuperCard Programming/Basics/Project Structure

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Projects[edit | edit source]

SuperCard files are usually refered to as projects.

A project can be:

  • edited and played in Supercard
  • played in the Supercard Player
  • turned into a Macintosh Application with the Standalone builder.

A SuperCard project can contain:

  • Windows, these windows contain one or more cards which contain the interface elements:
  • Menus
  • Resources

Supercard Projects can use:

  • external files
  • QuickTime movies
  • sounds
  • text
  • other files

A Supercard project must contain one window, but the other elements are optional.

Using SuperTalk we can find out a lot about a project from:

the properties of the project


describe(this project,all)

Windows[edit | edit source]

SuperCard displays its contents in standard (or custom) Macintosh windows.

The windows can be Dialog, Movable, Palette, Plain, Scrolling, Shadow or Standard Style. You can also create custom windows of any shape in these styles: customWindow, customDialog, customPalette.

A project can be made up of one or many windows, the windows in a project can be any of the possible styles.

Windows do not have any parts, they contain cards which contains the other interface elements.

You can retrieve a list of cards and backgrounds with

describe(windowDescriptor, all)

Cards[edit | edit source]

Windows can be thought of as a pack of cards. Cards can be thought of as slides in a slide show or index cards of a rolodex.

A window contains at least one card.

Cards contain the interface elements: buttons, fields and graphics. Cards can also display video, QuickTime and other media. Cards have two layers the card layer and a background layer that is shared by one or more cards.

A list of objects on a card can be obtained with SuperTalk:


Background[edit | edit source]

Objects on a background appear on all the cards that share that background. Navigation buttons are an example of common background content. If you create a new card it will share the background with the current card. Creating a new Background will create a background and the first card of that background.

A list of objects on a Background can be obtained with SuperTalk:


Parts[edit | edit source]

Parts or Objects There are three main types of card parts. These can be on the card or the background layer:

Parts are added to a card (or background) by choosing the appropriate tool and drawing them. For example you can choose the Round Rectangle button tool from the RTE's tool palette and draw a button. You can then double click it with the pointer tool and its info dialog will open and you can set it properties.

Parts can also be created with a SuperTalk script. In SuperTalk scripts parts can be referred to in three ways, by id, name or number. The id is given to an object by SuperCard when it is created in such a way it will be unique. The name can be give to an object via the Object Info dialog or with SuperTalk, it is not necessarily unique and can be changed. The Number is the objects stacking order.