• 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: bug in NSPropertyListSerialization +dataFromPropertyList:format:errorDescription:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in NSPropertyListSerialization +dataFromPropertyList:format:errorDescription:


  • Subject: Re: bug in NSPropertyListSerialization +dataFromPropertyList:format:errorDescription:
  • From: Charles Srstka <email@hidden>
  • Date: Fri, 15 Oct 2004 13:38:33 -0500

On Oct 15, 2004, at 5:35 AM, j o a r wrote:


On 2004-10-14, at 21.09, Eric Ocean wrote:

Before anyone writes to tell me that I should be initializing my variables, I considered the NSPropertyListSerialization to *be* my initializer. According to the documentation, it sets it to an NSString * or nil.

Yes, this is a bug (in the implementation and / or the documentation) - I have also filed a case for this problem.

The workaround is to check if "data" is nil or not, and only ever access the error string if data is == nil.

On 2004-10-15, at 12.10, Robert Martin wrote:

It looks like you're meant to be passing a pointer to an NSString, but you are passing a pointer to nothing. Have you tried something like: NSString *error = [NSString string]; ?

No, Eric did the right thing - your code is not meaningful. NSString is immutable, so what do you expect that the receiving method would do with the string object that you pass to it?

What if you initialize the error string with NSString *error = nil; ?

Charles

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >bug in NSPropertyListSerialization +dataFromPropertyList:format:errorDescription: (From: Eric Ocean <email@hidden>)
 >Re: bug in NSPropertyListSerialization +dataFromPropertyList:format:errorDescription: (From: j o a r <email@hidden>)

  • Prev by Date: Re: OSD api?
  • Next by Date: Re: [NEWBIE]: Scrolling windows
  • Previous by thread: Re: bug in NSPropertyListSerialization +dataFromPropertyList:format:errorDescription:
  • Next by thread: Getting notified when current document changes
  • Index(es):
    • Date
    • Thread