2006/1/3, Philip Dow <email@hidden>:
> Boisy, you may want to try the following.
>
> First, get the NSBundle object for your framework using :
>
> NSBundle *myFrameworkBundle = [NSBundle
> bundleWithIdentifier:@"com.myframework.name"];
>
> Then get the path to the sound file using
>
> NSString *soundPath = [myFrameworkBundle
> pathForResource:@"MySoundName" ofType:@"wav"];
A better idea would be to use:
NSString *soundPath = [myFrameworkBundle pathForSoundResource: @"MySoundName"];
That way, it will work even if the file's format/type is changed (to
aiff, mp3, whatever)
>
> Make sure the sound file ends in the .wav extension. That sound path
> should be a complete path whether using the framework or the
> application. Use that path to initialize your NSSound object - (id)
> initWithContentsOfFile:(NSString *)path byReference:(BOOL)byRef
--
Clark S. Cox III
email@hidden
My CV/Resume:
http://homepage.mac.com/clarkcox3/files/Resume.pdfhttp://homepage.mac.com/clarkcox3/files/Resume.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden