propertyListFromData: actually returns mutable objects?
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