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:
Francisco Ryan Tolmasky I
2011-01-17 01:31:15 -08:00
parent 8720a952b0
commit 9796f5d5d7
8 changed files with 325 additions and 191 deletions
+8
View File
@@ -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
/*!