diff --git a/ruamoko/include/Array.h b/ruamoko/include/Array.h index 060f50956..cfc95f595 100644 --- a/ruamoko/include/Array.h +++ b/ruamoko/include/Array.h @@ -274,6 +274,15 @@ withObject: (void *)arg; //\} +/** + Iteratively sends #performSelector:withObject:withObject: to each + contained object. +*/ +- (void) makeObjectsPerformSelector: (SEL)selector + withObject: (void *)arg + withObject: (void *)arg2; +//\} + @end #endif//__ruamoko_Array_h diff --git a/ruamoko/lib/Array.r b/ruamoko/lib/Array.r index 2946141cc..5fbaa9e56 100644 --- a/ruamoko/lib/Array.r +++ b/ruamoko/lib/Array.r @@ -410,6 +410,19 @@ } } +- (void) makeObjectsPerformSelector: (SEL)selector + withObject: (void *)anObject + withObject: (void *)anotherObject +{ + local int i; + + for (i = 0; i < [self count]; i++) { + [[self objectAtIndex: i] performSelector: selector + withObject: anObject + withObject: anotherObject]; + } +} + - (void) dealloc { local unsigned i;