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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to