• 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
propertyListFromData: actually returns mutable objects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

propertyListFromData: actually returns mutable objects?


  • Subject: propertyListFromData: actually returns mutable objects?
  • From: Eric <email@hidden>
  • Date: Sun, 28 May 2006 15:28:09 -0700

According to the documentation, NSPropertyListSerialization's
-propertyListFromData:mutabilityOption:format:errorDescription: method is
not capable of returning mutable objects regardless of the mutability:
setting.  However, I just tried it myself (with NSPropertyListImmutable as
mutability), and it appears I'm able to add and remove entries from the
dictionaries and arrays returned at well, on the top-level or not.  I did
not do any cast or mutableCopy, and just used id as the reference type.
I'm testing this on Mac OS 10.4.

Did Apple change the behavior of this method?  Is this something I can
depend on?

I have no problem using CFPropertyListCreateFromXMLData() to read plist as
mutable object (as per the documentation's recommendation), but the Cocoa
way is just much cleaner.

Thanks
_______________________________________________
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: propertyListFromData: actually returns mutable objects?
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: NSArrayControler
  • Next by Date: Cannot get mouseMoved in NSView
  • Previous by thread: Re: NSArrayControler
  • Next by thread: Re: propertyListFromData: actually returns mutable objects?
  • Index(es):
    • Date
    • Thread