mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
FIXED: replace js Array.map function with capp API
Also fixed BlockExpression description to match a little more with cocoa impl.
This commit is contained in:
@@ -65,12 +65,10 @@
|
||||
{
|
||||
var args = [];
|
||||
|
||||
if (_arguments !== nil)
|
||||
[_arguments enumerateObjectsUsingBlock:function(exp, idx)
|
||||
{
|
||||
args = _arguments.map(function(expression){
|
||||
return [expression expressionValueWithObject:object context:context];
|
||||
});
|
||||
}
|
||||
[args addObject:[exp expressionValueWithObject:object context:context]];
|
||||
}];
|
||||
|
||||
return _block(object, args, context);
|
||||
}
|
||||
@@ -89,7 +87,7 @@
|
||||
|
||||
- (CPString)description
|
||||
{
|
||||
return [CPString stringWithFormat:@"Block(0x%@)", [CPString stringWithHash:[self UID]]];
|
||||
return [CPString stringWithFormat:@"Block(function, %@)", [_arguments description]];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user