Re: Appending multiple dictionaries to a plist
Ok I got it working, I followed a few of your suggestions, and simply copied my plist to a dictionary before I wrote to it, and then added the profile attributes in a child dictionary. I then used the profile name as a key for the parent dictionary, then wrote back the parent dictionary back to the plist. Works great. Thanks goes out to you crazy kids for your help, John Farmer ----- Original Message ----- From: <ssudre2@wanadoo.fr> To: "John Farmer" <johndfarmer@hotmail.com> Cc: <cocoa-dev@lists.apple.com> Sent: Wednesday, April 30, 2003 12:41 AM Subject: Re: Appending multiple dictionaries to a plist
On mercredi, avril 30, 2003, at 12:16 AM, John Farmer wrote:
Greetings,
I am working on a application that will allow a user to have multiple
profiles. My problem is that when I want to write a new profile to a
plist
file, it overwrites my old one. I have looked through the
documentation to
try to find a way to append this dictionary to the plist without
overwritting
the existing dictionaries... Does anyone have any suggestions?
Embed your dictionary profiles in a dictionary whose keys are the name
of the profiles and the related values the profile.
_______________________________________________ cocoa-dev mailing list | cocoa-dev@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev Do not post admin requests to the list. They will be ignored.
participants (1)
-
John Farmer