It does not really make sense, but this should not be used anyway. Authors in a document should only be accessed by name. It only makes sense to get indexed authors from publications. Perhaps we shouldn't implement this at all.
Christiaan On 5 Jan 2008, at 9:22 PM, Adam R. Maxwell wrote: > Will this work since the -[NSSet allObjects] returns randomly ordered > objects? (maybe it makes sense for AS or in context of other commits; > it just caught my eye). > > On Jan 5, 2008, at 12:13 PM, [EMAIL PROTECTED] wrote: > >> Revision: 12286 >> http://bibdesk.svn.sourceforge.net/bibdesk/? >> rev=12286&view=rev >> Author: hofman >> Date: 2008-01-05 12:13:55 -0800 (Sat, 05 Jan 2008) >> >> Log Message: >> ----------- >> Avoid duplicate authors. >> >> Modified Paths: >> -------------- >> trunk/bibdesk/BibDocument+Scripting.m >> >> Modified: trunk/bibdesk/BibDocument+Scripting.m >> =================================================================== >> --- trunk/bibdesk/BibDocument+Scripting.m 2008-01-05 19:56:04 UTC >> (rev 12285) >> +++ trunk/bibdesk/BibDocument+Scripting.m 2008-01-05 20:13:55 UTC >> (rev 12286) >> @@ -199,12 +199,12 @@ >> } >> >> - (BibAuthor *)objectInAuthorsAtIndex:(unsigned int)idx { >> - NSMutableArray *auths = [NSMutableArray array]; >> + NSMutableSet *auths = [NSMutableSet set]; >> >> [auths performSelector:@selector(addObjectsFromArray:) >> withObjectsByMakingObjectsFromArray:publications >> performSelector:@selector(pubAuthors)]; >> >> if (idx < [auths count]) >> - return [auths objectAtIndex:idx]; >> + return [[auths allObjects] objectAtIndex:idx]; >> return nil; >> } >> >> @@ -245,12 +245,12 @@ >> } >> >> - (BibAuthor *)objectInEditorsAtIndex:(unsigned int)idx { >> - NSMutableArray *auths = [NSMutableArray array]; >> + NSMutableSet *auths = [NSMutableSet set]; >> >> [auths performSelector:@selector(addObjectsFromArray:) >> withObjectsByMakingObjectsFromArray:publications >> performSelector:@selector(pubEditors)]; >> >> if (idx < [auths count]) >> - return [auths objectAtIndex:idx]; >> + return [[auths allObjects] objectAtIndex:idx]; >> return nil; >> } >> >> >> >> This was sent by the SourceForge.net collaborative development >> platform, the world's largest Open Source development site. >> >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Bibdesk-commit mailing list >> [EMAIL PROTECTED] >> https://lists.sourceforge.net/lists/listinfo/bibdesk-commit > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Bibdesk-develop mailing list > Bibdesk-develop@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bibdesk-develop ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bibdesk-develop mailing list Bibdesk-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-develop