ControlPrototypes:
Filter:
Classes (extension) | Libraries > crucial > Instr

ControlPrototypes : Object
ExtensionExtension

creates default objects for Spec / argName combinations

Description

This is a registery of controls, cataloged by the Spec of their output. It was used by Patch to procure suitable control objects to satisfy an argument to a function.

In other words: you give it a Spec, it gives you some suitable Player object to use as an input.

In the current version or Patch this is not used, no special controls are registered for specific specs. You could use this to customise your "auto input creation" in any number of ways.

Its probably perferable to Spec-defaultControl

Class Methods

ControlPrototypes.registery

ControlPrototypes.initClass

ControlPrototypes.define( ... assns)

Keys are either symbols or classes, the values are functions that return arrays of prototypes. Patch simply selects the first in the list. Other methods of ControlPrototypes use the full list.

The function is valued each time so that the control is a unique instance.

You may freely change or redefine control protypes while working/composing without recompiling.

This class also serves to decouple Spec from knowing of the various controls, gadgets and widgets.

Arguments:

... assns

ControlPrototypes.at(key, spec)

Arguments:

key
spec

ControlPrototypes.forSpec(argName, spec)

Arguments:

argName
spec

ControlPrototypes.firstAt(argName, spec)

Arguments:

argName
spec

ControlPrototypes.chooseAt(argName, spec)

Arguments:

argName
spec

ControlPrototypes.chooseForSpec(argName, spec)

Arguments:

argName
spec

ControlPrototypes.listForSpec(argName, spec)

Arguments:

argName
spec

Inherited class methods

Instance Methods

Inherited instance methods

Examples

In your Main-startUp method: