On 24/03/2011, at 13:13, Hank Heijink (Mailinglists) wrote: > On Mar 24, 2011, at 12:06 PM, Siegfried wrote: > >> So, after discussing some methods to import and export a CoreData database, >> I ended up sticking with my initial XML idea. >> ... > > You need to copy currentXMLValue, because in your code, every item that > refers to it ends up referring to the same mutable string, which will change > every time the parser:foundCharacters: method is called. > > NSString *newValue = [currentXMLValue copy]; > [currentEntity setValue:newValue forKey:kAttrName]; > [newValue release]; > > Assigning strings like you did works with immutable ones, but not with > mutable ones.
Ah Hank! How can I thank you? Such a simple thing but was driving me crackers. Thanks so much, Best regards, Siegfried_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com