[libr] Add a two-object Array perform method

I decided it was worth doing after all. This cleans up event forwarding
in qwaq.
This commit is contained in:
Bill Currie 2020-03-26 14:14:04 +09:00
parent 6e473dc8f2
commit 983a7422db
2 changed files with 22 additions and 0 deletions

View file

@ -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

View file

@ -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;