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

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
  • Follow-Ups:
    • Re: NSString propertyList crash
      • From: Andy Lee <email@hidden>
References: 
 >Re: NSString propertyList crash (From: Greg Herlihy <email@hidden>)
 >Re: NSString propertyList crash (From: Andy Lee <email@hidden>)
 >Re: NSString propertyList crash (From: Tito Ciuro <email@hidden>)

  • Prev by Date: Re: Accessing NSTableView bindings' datasource
  • Next by Date: Re: NSString propertyList crash
  • Previous by thread: Re: NSString propertyList crash
  • Next by thread: Re: NSString propertyList crash
  • Index(es):
    • Date
    • Thread