A package represents a category of programming tools that encloses related functions and classes. It can be organized in sub packages.
Each package is represented by a small suitcase.
For instance, the Score package contains classes that are literally dedicated to the score domain, such as chords, notes, polyphonies, and functions that can perform operations upon these classes.
These packages and their content are "protected" and cannot be modified by the user.
The User Package can receive user-defined classes and functions, which can be dispatched in dedicated sub packages. These classes and functions can be modified.
The User Libraries package encloses a set of additional libraries that can be added or loaded dynamically.
The Globals package is a special folder that contains user-defined global variables. It cannot contain sub packages.
If a package is supposed to contain sub packages, it features an adjacent triangle that allows to open a package on List mode . When this triangle is clicked, the package unfolds and displays its inner sub packages – see below.
To get information about a select package, class or function of the library, use the
Info window :
Ctrl/ right click on an item and choose
File / Get Info
Information related to the items of the User package can also be edited.
A package gives access to both functions and classes of a common "theme", or category of tools. Packages contents can be displayed in 'Package' mode or ' Class Tree' mode .
The default presentation allows to get a global view of a package whole organization in sub packages.
Classes and functions contained in the sub packages cannot be accessed, though.
The Package mode allows to access the set of tools contained in a package as a whole : sub packages cannot be visualized.
Ctrl/ right click on the suitcase and choose
The window extends to display two side panels, respectively containing the package's functions and classes.
Their content is refreshed at the selection of another package.
A " class tree " shows the inheritance between the classes of a common package.
The class tree is displayed in a new window. Class trees of the User sub packages can be created and modified graphically.
Tools can be dropped in patches from the library window.
Note that the OM Functions and Classes menus are organized following the Library packages structure, and can also be used to select items from the different OM packages.
A category of objects sharing common properties – characteristics and behaviour. A class specifies the internal structure and behaviour of an object. In OM, it is represented in a patch by a factory box that can produce an instance of a class.
See also : Object, Instance
A portion of code within a larger program, which performs a specific task. Operates upon 0 or more parameters and returns a value.
An instance of OM object that has been saved in order to be used in other programs. Global variables are visible from the
Library window and stored as .omi files in the
Globals folder of the workspace.
In object oriented programming, a generic function is a collection of methods – elementary specialized functions – with the same name and argument structure, but with arguments typed differently.
See also : Method