NSSound and private embedded frameworks
NSSound and private embedded frameworks
- Subject: NSSound and private embedded frameworks
- From: Boisy Pitre <email@hidden>
- Date: Sun, 1 Jan 2006 19:32:55 -0600
Hi all,
I have a private embedded framework that contains code, several image
files and several WAV files. In turn, this framework is inside of
the a Cocoa application bundle.
There are two .wav files: insert.wav and eject.wav which are part of
the framework, and are in the BP.framework/Resources folder. The
BP.framework folder in turn is located in the applications Contents/
Frameworks folder (hence it is "private embedded")
I've followed the instructions on http://rentzsch.com/cocoa/
embeddedFrameworks and so far almost everything is working EXCEPT for
sound.
In a routine in the framework code, I have the following lines:
insertSound = [NSSound soundNamed:@"insert"];
NSLog(@"Insert Sound = %X", insertSound);
The log shows that insertSound is 0 (nil) when I run the
application. However, if I copy eject.wav and insert.wav from
Contents/Frameworks/BP.framework/Resources to Contents/Resources, the
Log shows that the insertSound pointer is not nil and the sound
actually works.
The framework's NIB file shows the 'insert' and 'eject' sounds in the
Sounds tab, so the NIB file "sees" them, but it appears that NSSound
is only looking in Contents/Resources and not the framework's
Resources folder for sounds.
Could someone possibly shed some light on why this might be
happening? If I haven't provided enough information, please let me
know.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden