Appendix E - Macintosh Resources



The "Child Interview Assistant" package utilises resources to permit the customisation of scenes used in the "Emotions" and "Feelings" section, buildings, spoken & written messages, and the members of the "Global Family".

Examples of the displays produced by ResEdit when editing an "ICON" resource appear below. ResEdit displays an icon for each type of resource present within the currently opened resource-file (see figure E.1). In this way it is possible to tell at-a-glance, if a particular type of resource is used by a package. In this case the opened file contains resources of types such as "CURS", "ICON", "MENU", "PICT", "snd " and "WIND". A more detailed discussion of the use of these resources is given later in an appendix.



fig. E.1 - view of the package's resources using Apple's ResEdit.


Double-clicking the ICON resource opens ResEdit's ICON resource picker - which displays all such resources, along with their IDs - see figure E.2 below.


fig. E.2 - view of ICONs used in the package using Apple's ResEdit.


Double-clicking on the desired ICON opens up ResEdit's built-in icon-editor. This permits the graphical manipulation of the 32 by 32 pixel bitmap which defines a Macintosh icon (figure E.3).



fig. E.3 - ICON resource editor in Apple's ResEdit.


By clicking individual pixels it is possible to toggle their state from on to off and vice versa. This icon-editor is one of several graphical resource-editors built-in to ResEdit. ResEdit also has the ability to define templates for custom resources (i.e. non system-standard resources). A template is defined as a resource of type "TMPL". Its structure is a set of elements detailing the types of items expected by the custom resource type the template is to represent, and its name (which should be exactly four characters in length), represents the type name of the resource whose template it is. In order to better illustrate resource templates we will look at the template for "MScn" and "FScn" resources - which are used to refer to details within pictures for Male and Female scenes respectively, within the "Emotions" section of the package.

The structure of these resources is as follows: eight Rectangles (a rectangle is defined by the Macintosh operating system with reference to its top-left, and bottom-right hand corners) the first of which is the location on the screen of the picture of the scene, and the following seven of which are the location within that scene of each of the possible emotional expressions ("very happy", "happy", "neutral", "sad", "angry", "puzzled", and "frightened"). The final part of the resource is the ID of a colour version of the scene to which the resource refers. If it is zero then no colour equivalent picture exists. The colour picture is displayed when the package encounters a display capable of grey-scale or colour, not the single bit-per-pixel display of some Macintosh computers. Figure E.4 is a view of the template which is used by ResEdit to define the structure of the "MScn" resources. The section of the template displayed shows the types and titles of the first elements of the resource.

fig. E.4 - ResEdit's TMPL (template) editor, shown editing the "MScn" resource-template.


Each of the seven emotional-expressions (see figure E.5) needs its own positioning rectangle, since the pictures that represent them which are placed on the drawing of a scene, are different shapes - and hence different sizes.



fig. E.5 - the seven emotional expressions as they appear in the emotional control.



back to Appendix D. forward to Appendix F