Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Appending multiple dictionaries to a plist



----- Original Message -----
From: <email@hidden>
To: "John Farmer" <email@hidden>
Cc: <email@hidden>
Sent: Wednesday, April 30, 2003 12:41 AM
Subject: Re: Appending multiple dictionaries to a plist


That's essentially what I have done, when I write to the plist my structure
looks something like this:

<dict>
<key>profile name</key>
<dict>
<key></key>
<string></string>
.
.
.
</dict>
</dict>

My real problem seems to be when the user creates a new profile name in the
app, it will just overwrite the above structure with the new profile, not
append that profile after the preceding ones in the plist.. I am using
the [dict writeToFilePath:path atomically: YES]. I've tried to use both yes
and no for writing atomically, but it doesn't seem to make a difference.

>
> 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 | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Appending multiple dictionaries to a plist (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.