mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[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:
parent
6e473dc8f2
commit
983a7422db
2 changed files with 22 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue