Copyright ã1996 by NeXT Software, Inc.  All Rights Reserved.

;CustomizingTitlesTextFieldsAndScrollViews.rtfd;;¬  Next Section	;AssociatingImagesWithButtons.rtfd;;¬  Previous Section

Managingimages;¬Managing images and sounds

¬	To add an image or sound, drag its file icon from the File Viewer and drop it over the nib file window.

¬	Examine the image or sound in the Inspector's Attributes display.

You can add images and sounds to a nib file. The image or sound is added to the appropriate display no matter what display is currently showing.

¬

Although the association of images and sounds with buttons is an important reason for putting them into a nib file, there are other reasons. When you composite an image or play a sound in your code, the search path (if your code supplies no path) starts with the application's executable (already loaded resources), the main bundle, and the main bundle's .lproj directories. Then the standard directories are searched: 

¬	the appropriate subdirectory of the user's ~/Library directory
¬	the appropriate directory in /LocalLibrary
¬	the appropriate directory in /NextLibrary

If you do not want to risk an image or sound not being in one of these standard directories, then you should store it in a nib file or in the project.

Tip: For most situations, the recommended course of action is to add images and sounds to your project. If you add them only to a nib file, they won't be available to an application until the nib file is loaded.

Images and sounds have their own Attributes displays. For images, this is mostly useful for images that are too large to show in the nib file window.

¬

If your system has a microphone or some other input source connected, you can record new sounds. Click OK to save new sounds.

¬

As shown in ªAssociating images or sounds with buttons,º you can add images and sounds to a nib file as a side effect of associating them with a button.  ;AssociatingImagesWithButtons.rtfd;;¬