From 2ab0c854852455a14d05be5811801235ae0a6081 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 8 Feb 2007 16:30:07 +0000 Subject: [PATCH] Monotone-Parent: 69c9141518bd7929013517efa91e7a4d18ce64d5 Monotone-Revision: 240c1be6b26b2d277b63045d20ee3e4860aba1f8 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-02-08T16:30:07 Monotone-Branch: ca.inverse.sogo --- SoObjects/SOGo/NSArray+Utilities.h | 6 ++++++ SoObjects/SOGo/NSArray+Utilities.m | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/SoObjects/SOGo/NSArray+Utilities.h b/SoObjects/SOGo/NSArray+Utilities.h index bd026f4c3..15cbb174b 100644 --- a/SoObjects/SOGo/NSArray+Utilities.h +++ b/SoObjects/SOGo/NSArray+Utilities.h @@ -31,6 +31,12 @@ - (NSArray *) stringsWithFormat: (NSString *) format; +#ifdef GNUSTEP_BASE_LIBRARY +- (void) makeObjectsPerform: (SEL) selector + withObject: (id) object1 + withObject: (id) object2; +#endif + @end #endif /* NSARRAY_UTILITIES_H */ diff --git a/SoObjects/SOGo/NSArray+Utilities.m b/SoObjects/SOGo/NSArray+Utilities.m index 6949db3bd..ed30b5e5a 100644 --- a/SoObjects/SOGo/NSArray+Utilities.m +++ b/SoObjects/SOGo/NSArray+Utilities.m @@ -45,4 +45,17 @@ return formattedStrings; } +- (void) makeObjectsPerform: (SEL) selector + withObject: (id) object1 + withObject: (id) object2 +{ + int count, max; + + max = [self count]; + for (count = 0; count < max; count++) + [[self objectAtIndex: count] performSelector: selector + withObject: object1 + withObject: object2]; +} + @end