Re: pathForResource with nil Type
Re: pathForResource with nil Type
- Subject: Re: pathForResource with nil Type
- From: Andy Lee <email@hidden>
- Date: Tue, 10 Sep 2002 15:51:03 -0400
At 8:26 PM +0100 9/10/02, Jeremy Dronfield wrote:
Thanks. I'll almost certainly end up using the if statement.
However, there must either be more to -pathForResource:'s capability
or the Cocoa docs are distinctly misleading. They specifically say
that, with a nil Type argument, "the resource sought is identified
by name, WITH NO EXTENSION" (my caps). Maybe support for this has
been dropped (although I can't find anything about it in the Release
Notes).
I would say the docs are misleading, or at least ambiguous. I think
they mean that if you don't specify a file extension, it uses the
first argument as the entire file name, without appending any
extension to it -- hence "with no extension."
This actually makes sense to me. If you said
pathForResource:@"foo" ofType:@""
and you had both a foo.rtf and a foo.rtfd in your app, how would it
know which one you wanted?
--Andy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.