0
0
Fork 0
mirror of https://git.code.sf.net/p/quake/quakeforge synced 2025-03-21 18:01:15 +00:00

add finding elements

This commit is contained in:
Bill Currie 2006-12-16 13:59:29 +00:00 committed by Jeff Teunissen
parent 0bd92e439a
commit 68e7b3199d
2 changed files with 10 additions and 0 deletions
ruamoko
include
lib

View file

@ -19,6 +19,7 @@
- (id) removeItemAt: (integer) index;
- (id) insertItemAt: (integer) index item:(id) item;
- (integer) count;
- (integer) findItem: (id) item;
-(void)makeObjectsPerformSelector:(SEL)selector;
-(void)makeObjectsPerformSelector:(SEL)selector withObject:(id)arg;
@end

View file

@ -117,6 +117,15 @@
return count;
}
- (integer) findItem: (id) item
{
local integer i;
for (i = 0; i < count; i++)
if (array[i] == item)
return i;
return -1;
}
-(void)makeObjectsPerformSelector:(SEL)selector
{
local integer i;