mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-05 16:42:58 +00:00
added enumerateWithBlock: to CPArray
This commit is contained in:
1 parent
bbd402fcff
commit
39bb8e3418
1 file changed
+12
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user