From: <ho...@us...> - 2006-03-29 09:09:20
|
Revision: 6059 Author: hofman Date: 2006-03-29 01:09:11 -0800 (Wed, 29 Mar 2006) ViewCVS: http://svn.sourceforge.net/bibdesk/?rev=6059&view=rev Log Message: ----------- Call super's init in initWithCoder. Modified Paths: -------------- trunk/bibdesk/BDSKComplexString.m Modified: trunk/bibdesk/BDSKComplexString.m =================================================================== --- trunk/bibdesk/BDSKComplexString.m 2006-03-29 06:45:05 UTC (rev 6058) +++ trunk/bibdesk/BDSKComplexString.m 2006-03-29 09:09:11 UTC (rev 6059) @@ -199,16 +199,18 @@ - (Class)classForKeyedArchiver { return BDSKComplexStringClass; } - (id)initWithCoder:(NSCoder *)coder{ - OBASSERT([coder isKindOfClass:[NSKeyedUnarchiver class]]); - nodes = [[coder decodeObjectForKey:@"nodes"] retain]; - complex = [coder decodeBoolForKey:@"complex"]; - inherited = [coder decodeBoolForKey:@"inherited"]; - NSKeyedUnarchiver *unarchiver = (NSKeyedUnarchiver *)coder; - if ([[unarchiver delegate] respondsToSelector:@selector(unarchiverMacroResolver:)]) { - macroResolver = [[unarchiver delegate] unarchiverMacroResolver:unarchiver]; - } else - macroResolver = nil; - return self; + if (self = [super init]) { + OBASSERT([coder isKindOfClass:[NSKeyedUnarchiver class]]); + nodes = [[coder decodeObjectForKey:@"nodes"] retain]; + complex = [coder decodeBoolForKey:@"complex"]; + inherited = [coder decodeBoolForKey:@"inherited"]; + NSKeyedUnarchiver *unarchiver = (NSKeyedUnarchiver *)coder; + if ([[unarchiver delegate] respondsToSelector:@selector(unarchiverMacroResolver:)]) { + macroResolver = [[unarchiver delegate] unarchiverMacroResolver:unarchiver]; + } else + macroResolver = nil; + } + return self; } - (void)encodeWithCoder:(NSCoder *)coder{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |