pathForResource with nil Type
pathForResource with nil Type
- Subject: pathForResource with nil Type
- From: Jeremy Dronfield <email@hidden>
- Date: Tue, 10 Sep 2002 18:14:56 +0100
The NSBundle documentation for -pathForResource:ofType: says that "If
the extension argument is nil or an empty string, the resource sought is
identified by name, with no extension". Well, I'm passing it an empty
string for Type, and it's handing me back an empty path:
path = [[NSBundle mainBundle] pathForResource:fileToGet ofType:@""];
[textView readRTFDFromFile:path];
RUN LOG ERROR:
-[NSURL initFileURLWithPath:]: must supply a non=empty path
The reason I want to do this, BTW, is so I can load either rtf or rtfd
files into textView with the same method. Why isn't -pathForResource:
finding my resource files?
-Jeremy
========================================
email@hidden // email@hidden
The Alchemy Pages:
- fractious fiction at
http://freespace.virgin.net/jeremy.dronfield
========================================
_______________________________________________
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.