• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unable to get resources from bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Unable to get resources from bundle
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: WEP-Key in the preferences.plist FILE ??
  • Next by Date: Re: Unable to get resources from bundle
  • Previous by thread: WEP-Key in the preferences.plist FILE ??
  • Next by thread: Re: Unable to get resources from bundle
  • Index(es):
    • Date
    • Thread