Re: arrayWithContentsOfFile
Re: arrayWithContentsOfFile
- Subject: Re: arrayWithContentsOfFile
- From: "I. Savant" <email@hidden>
- Date: Tue, 13 Oct 2009 16:27:54 -0400
On Oct 13, 2009, at 3:52 PM, DKJ wrote:
------------------------------------
NSArray *data;
data = [NSArray arrayWithContentsOfFile:[NSHomeDirectory()
stringByAppendingPathComponent:@"/Documents/file.plist"]];
if( data == nil )
do this;
------------------------------------
There's no file.plist in the directory. But "do this" doesn't get
done.
So that's exactly how the code appears? You declare your "data"
array and immediately assign it thereafter? Nothing in between?
Very odd. I haven't seen this behavior, nor can I reproduce it.
What happens if you set a breakpoint, step past the
+arrayWithContentsOfFile call, and "po data" at the debugger console?
What does it log?
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden