• 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: pathForResource with nil Type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: pathForResource with nil Type (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Re: One click to switch windows and press controll
  • Next by Date: Re: cocoa-dev digest, Vol 2 #1226 - 17 msgs
  • Previous by thread: Re: pathForResource with nil Type
  • Next by thread: Getting NSView mousedown event postion?
  • Index(es):
    • Date
    • Thread