mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-03 07:36:16 +00:00
Fix CPPopUpButton menu support.
- Added enumerateObjectsUsingBlock: to CPArray - Fixed a remaining case of [] being used instead of objectAtIndex: in CPMutableArray. - Added KVO support for menu items array in menus. - Changed CPPopUpButton to use KVO to sync up with menu instead of notifications. - Removed extra menu encoding in CPPopUpButton. - Removed extra mainMenu object from CPApplication. - Use setters in CPResponder instead of direct ivar access in initWithCoder:. Closes #298. Closes $1059. Reviewed by me.
This commit is contained in:
@@ -517,6 +517,14 @@ var concat = Array.prototype.concat,
|
||||
objj_msgSend([self objectAtIndex:index], aSelector);
|
||||
}
|
||||
|
||||
- (void)enumerateObjectsUsingBlock:(Function)aFunction
|
||||
{
|
||||
var index = 0,
|
||||
count = [self count];
|
||||
|
||||
for (; index < count; ++index)
|
||||
aFunction([self objectAtIndex:index], index);
|
||||
}
|
||||
|
||||
// Comparing arrays
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user