added enumerateWithBlock: to CPArray

This commit is contained in:
Klaas Pieter Annema committed 2010-04-23 16:34:40 +02:00
1 parent bbd402fcff
commit 39bb8e3418
1 file changed
+12
+12
View File
@@ -1235,6 +1235,18 @@
sort(function(lhs, rhs) { return objj_msgSend(lhs, aSelector, rhs); });
}
- (void)enumerateObjectsUsingBlock:(Function)aBlock
{
for (var i = 0; i < self.length; i++)
{
var shouldStop = NO;
aBlock(self[i], i, shouldStop);
if (shouldStop)
break;
}
}
@end
@implementation CPArray (CPCoding)