Re: NSString propertyList crash
Re: NSString propertyList crash
- Subject: Re: NSString propertyList crash
- From: Keith Wilson <email@hidden>
- Date: Mon, 20 Mar 2006 16:04:40 +1100
But why doesn't dictionaryWithContentsOfFile: return nil when asked
to read a binary plist? don't ask me but maybe that is where the
real bug is at.
TFM says the following:
<<QUOTE>>
dictionaryWithContentsOfFile:
Allocates and initializes a dictionary using the keys and values
found in path.
+ (id)dictionaryWithContentsOfFile:(NSString *)path
Discussion
path can be a full or relative pathname. The file identified by path
must contain a string representation of a property list whose root
object is a dictionary. The dictionary must contain only property
list objects (NSData, NSDate, NSNumber, NSString, NSArray, or
NSDictionary objects).
This method returns nil if there is a file error or if the contents
of the file are an invalid representation of a dictionary.
<<UNQUOTE>>
Keith
On 20/03/2006, at 3:40 PM, Tito Ciuro wrote:
On 19/03/2006, at 20:31, Andy Lee wrote:
I would still claim there is a bug, because according to the docs,
-[NSDictionary description] and -[NSString propertyList] should
convert between string and dictionary representations, and I can
create a trivial case where that is not true:
NSDictionary *dict =
[NSDictionary dictionaryWithObjectsAndKeys:
[NSDate date], @"today",
nil];
NSString *desc = [dict description];
NSDictionary *newDict = [desc propertyList]; // throws exception
It sure looks like a bug to me...
-- Tito
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40bigpond.net.au
This email sent to email@hidden
_______________________________________________
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