Re: bug in NSPropertyListSerialization +dataFromPropertyList:format:errorDescription:
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