Unable to get resources from bundle
Unable to get resources from bundle
- Subject: Unable to get resources from bundle
- From: Darrin Cardani <email@hidden>
- Date: Fri, 1 Jul 2005 11:32:39 -0500
I have an iMovie plugin that includes some resource files in the
Resources folder inside the plugin's bundle. They're a custom
resource type. In the plugin, I make the following calls to get the
list of resources:
NSBundle* ourBundle = [NSBundle bundleWithIdentifier:@"ouridentifier"];
NSString* resourcesPath = [ourBundle resourcePath];
mPresets = [ourBundle pathsForResourcesOfType:@"preset"
inDirectory:resourcesPath];
UInt32 numPresets = [mPresets count];
Retrieving the bundle works correctly, as does getting the resources
path. However, the call to pathsForResourcesOfType:inDirectory:
returns an empty array. I have verified that there are files of type
"preset" in the Resources directory. I also tried setting the type
string to nil, as the docs indicate that this will return all
resources in the given directory. That also returns nil. Obviously,
there are other resources in that directory, such as the plugin's
.nib file, and some images. So what am I missing about this method?
Why am I always getting back a 0-length array?
Thanks,
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
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