Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Now that the infrastructure of the Minicomposer module is ready, we will begin to make it really do something.
The first order of business is to recognize *.score files as meaningful in the IDE. While most of this is “boilerplate” code, several classes and setting files are involved, and it is worth examining each of them because we will need to understand and customize the code later on.
The basic hook the module adds to the IDE is a data loader that is
tuned to notice score files and provide data objects that the IDE can
interact with. We will make this data loader sensitive to file MIME
type, rather than directly looking for a particular file extension.
The first step is to define a MIME type for score files, meaning that
the IDE understands that the files are in a certain format distinct
from other text or binary files. The score file format is invented
for this example and there is not a standard MIME type for it, so we
will create one, text/x-minicomposer-score.