From c5d54b5aa8a54c6f2bd58ef57b9569a7baafa889 Mon Sep 17 00:00:00 2001 From: Marcian Lytwyn Date: Thu, 26 Jan 2017 15:39:06 +0000 Subject: [PATCH] Fix XIB 5 processing to replace previously decoded object git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40304 72102866-910b-0410-8b05-ffd578937521 --- Source/GSXib5KeyedUnarchiver.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/GSXib5KeyedUnarchiver.m b/Source/GSXib5KeyedUnarchiver.m index e7bbaa69d..d6b7b1bb8 100644 --- a/Source/GSXib5KeyedUnarchiver.m +++ b/Source/GSXib5KeyedUnarchiver.m @@ -2285,6 +2285,7 @@ didStartElement: (NSString*)elementName { id object = [super objectForXib: element]; + // If no object check other possibilities related to XIB 5... if (object == nil) { NSString *elementName = [element type]; @@ -2334,6 +2335,10 @@ didStartElement: (NSString*)elementName options: NSDataBase64DecodingIgnoreUnknownCharacters]; object = AUTORELEASE([[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding]); RELEASE(data); + + // Replace previous object... + if ([element attributeForKey: @"id"]) + [decoded setObject: object forKey: [element attributeForKey: @"id"]]; } } }