Re: Loading images from subfolder of Resources
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