Recherche Google
OM 6.5 – User ManualVisual Programming II > Interface Boxes > Check Box
page précédentepage suivante

Controlling Operations : the Check Box

The check-box object resembles a predicate. If the box is checked, it returns "true". If not, it returns "nil". Hence, it can be used as a "switch on / off condition" for the execution of programs. It must be associated with conditional boxes that will call the programs.

Features

Inputs and Outputs

The check-box object has one input and one output :

  • "text" : a statement

  • the output returns "t" or "nil" depending on if the box is checked or not.

Editing the Statement

To change the box's statement :

  1. click or SHIFT click on the first input to edit it and validate,

  2. select the box again,

  3. evaluate the box.

Use

Wherever the box is clicked, it is successively checked or unchecked. Depending on its state, the box output returns "t" or "nil".

In the first case, the OMIF box returns the second argument, because the checkbox returns "nil". In the second case, it returns the first argument, because the checkbox returns "t".
In the first case, the OMIF box returns the second argument, because the checkbox returns "nil". In the second case, it returns the first argument, because the checkbox returns "t".
Using Conditions in a Program
For a More than Two Options

A Musical Application : an Extended Example

Building a Triad with an Item-List-Box, a Button-Box, and a Check Box
page précédentepage suivante
A propos...(c) Ircam - Centre PompidouRéalisé avec Scenari