• 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: arrayWithContentsOfFile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: arrayWithContentsOfFile
      • From: DKJ <email@hidden>
References: 
 >arrayWithContentsOfFile (From: DKJ <email@hidden>)
 >Re: arrayWithContentsOfFile (From: "I. Savant" <email@hidden>)
 >Re: arrayWithContentsOfFile (From: Jens Alfke <email@hidden>)
 >Re: arrayWithContentsOfFile (From: "I. Savant" <email@hidden>)
 >Re: arrayWithContentsOfFile (From: DKJ <email@hidden>)
 >Re: arrayWithContentsOfFile (From: "I. Savant" <email@hidden>)
 >Re: arrayWithContentsOfFile (From: DKJ <email@hidden>)
 >Re: arrayWithContentsOfFile (From: "I. Savant" <email@hidden>)
 >Re: arrayWithContentsOfFile (From: DKJ <email@hidden>)

  • Prev by Date: Re: arrayWithContentsOfFile
  • Next by Date: Object Alloc Instrument and releasing question
  • Previous by thread: Re: arrayWithContentsOfFile
  • Next by thread: Re: arrayWithContentsOfFile
  • Index(es):
    • Date
    • Thread