From: <ho...@us...> - 2006-05-02 19:53:08
|
Revision: 6396 Author: hofman Date: 2006-05-02 12:52:50 -0700 (Tue, 02 May 2006) ViewCVS: http://svn.sourceforge.net/bibdesk/?rev=6396&view=rev Log Message: ----------- Fix typo. Save static group keys as a single comma delimited string. Modified Paths: -------------- trunk/bibdesk/BibDocument_Groups.m Modified: trunk/bibdesk/BibDocument_Groups.m =================================================================== --- trunk/bibdesk/BibDocument_Groups.m 2006-05-02 19:17:18 UTC (rev 6395) +++ trunk/bibdesk/BibDocument_Groups.m 2006-05-02 19:52:50 UTC (rev 6396) @@ -1194,14 +1194,14 @@ - (NSData *)serializedGroupsData { NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:2]; NSMutableArray *array = [NSMutableArray arrayWithCapacity:[staticGroups count]]; - NSArray *keys; + NSString *keys; NSDictionary *groupDict; NSEnumerator *groupEnum = [staticGroups objectEnumerator]; BDSKGroup *group; groupEnum = [staticGroups objectEnumerator]; while (group = [groupEnum nextObject]) { - keys = [[(BDSKStaticGroup *)group publications] valueForKeyPath:@"@distinctUnionOfObjects.citeKey"]; + keys = [[[(BDSKStaticGroup *)group publications] valueForKeyPath:@"@distinctUnionOfObjects.citeKey"] componentsJoinedByString:@"'"]; groupDict = [[NSDictionary alloc] initWithObjectsAndKeys:[group stringValue], @"group name", keys, @"keys", nil]; [array addObject:groupDict]; [groupDict release]; @@ -1210,7 +1210,7 @@ [dict setObject:array forKey:@"static groups"]; groupEnum = [smartGroups objectEnumerator]; - while (groupDict = [groupEnum nextObject]) { + while (group = [groupEnum nextObject]) { groupDict = [[[(BDSKSmartGroup *)group filter] dictionaryValue] mutableCopy]; [(NSMutableDictionary *)groupDict setObject:[group stringValue] forKey:@"group name"]; [array addObject:groupDict]; @@ -1263,7 +1263,7 @@ groupEnum = [[plist objectForKey:@"static groups"] objectEnumerator]; while (groupDict = [groupEnum nextObject]) { - keys = [groupDict objectForKey:@"keys"]; + keys = [[groupDict objectForKey:@"keys"] componentsSeparatedByString:@","]; keyEnum = [keys objectEnumerator]; pubArray = [[NSMutableArray alloc] initWithCapacity:[keys count]]; while (key = [keyEnum nextObject]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |