• 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
Re: Loading images from subfolder of Resources
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading images from subfolder of Resources


  • Subject: Re: Loading images from subfolder of Resources
  • From: Evan Schoenberg <email@hidden>
  • Date: Fri, 21 Jan 2005 11:00:19 -0600


On Jan 21, 2005, at 8:32 AM, Ricky Sharp wrote:

(9) [[NSBundle mainBundle] pathForResource:@"RoundGreenPressed" ofType:nil]
* (null)

This DOES NOT match expected result. Path should have been returned.

(11) [[NSBundle mainBundle] pathForResource:@"RoundRedNormal" ofType:nil inDirectory:@"Images"]
* (null)

This DOES NOT match expected result. Path should have been returned.

In each of these cases, your file has an extension, though. According to the documentation:

<x-tad-bigger>- (</x-tad-bigger><x-tad-bigger>NSString</x-tad-bigger><x-tad-bigger> *)pathForResource:(</x-tad-bigger><x-tad-bigger>NSString</x-tad-bigger><x-tad-bigger> *)</x-tad-bigger>name<x-tad-bigger> ofType:(</x-tad-bigger><x-tad-bigger>NSString</x-tad-bigger><x-tad-bigger> *)</x-tad-bigger>extension
Returns the full pathname for the resource identified by name with the specified file extension. If the extension argument is <x-tad-bigger>nil</x-tad-bigger> or an empty string (@“”), the resource sought is identified by name, with no extension.

[emphasis mine].

The methods appear to me to be performing as per documentation.

-Evan
 _______________________________________________
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: Loading images from subfolder of Resources
      • From: Ricky Sharp <email@hidden>
References: 
 >Loading images from subfolder of Resources (From: Ricky Sharp <email@hidden>)
 >Re: Loading images from subfolder of Resources (From: "M. Uli Kusterer" <email@hidden>)
 >Re: Loading images from subfolder of Resources (From: Ricky Sharp <email@hidden>)
 >Re: Loading images from subfolder of Resources (From: "M. Uli Kusterer" <email@hidden>)
 >Re: Loading images from subfolder of Resources (From: Ricky Sharp <email@hidden>)
 >Re: Loading images from subfolder of Resources (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: Why do "loose" nibs take precedence over nibs in .lproj?
  • Next by Date: Re: CFSocket event handler accessing GUI variables
  • Previous by thread: Re: Loading images from subfolder of Resources
  • Next by thread: Re: Loading images from subfolder of Resources
  • Index(es):
    • Date
    • Thread