From 94c838dfde11d96db3287f0ce0a63ed94f0a0da7 Mon Sep 17 00:00:00 2001 From: Ross Boucher Date: Mon, 2 Feb 2009 18:24:06 -0700 Subject: [PATCH] Various fixes. --- AppKit/CPMenuItem.j | 8 ++++++++ AppKit/CPPopUpButton.j | 9 +++++++++ Foundation/CPArray.j | 12 ++++++++++-- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/AppKit/CPMenuItem.j b/AppKit/CPMenuItem.j index 217382ed6..77031d9ea 100644 --- a/AppKit/CPMenuItem.j +++ b/AppKit/CPMenuItem.j @@ -230,6 +230,14 @@ return _title; } +/*! + Set's the item's text color +*/ +- (void)setTextColor:(CPString)aColor +{ + //FIXME IMPLEMENT +} + /*! Sets the font for the text of this menu item @param aFont the font for the menu item diff --git a/AppKit/CPPopUpButton.j b/AppKit/CPPopUpButton.j index d36c8a68d..9e0131bf3 100644 --- a/AppKit/CPPopUpButton.j +++ b/AppKit/CPPopUpButton.j @@ -138,6 +138,15 @@ var CPPopUpButtonArrowsImage = nil; } // Inserting and Deleting Items + +/*! + Adds a new menu item using a CPMenuItem object. +*/ +- (void)addItem:(CPMenuItem)anItem +{ + [_menu addItem:anItem]; +} + /*! Adds a new menu item with the specified title. @param the new menu item's tite diff --git a/Foundation/CPArray.j b/Foundation/CPArray.j index cb4951ad6..98b5bcf05 100755 --- a/Foundation/CPArray.j +++ b/Foundation/CPArray.j @@ -51,7 +51,7 @@ if (++_index >= [_array count]) return nil; - return _array[_index]; + return [_array objectAtIndex:_index]; } @end @@ -81,7 +81,7 @@ if (--_index < 0) return nil; - return _array[_index]; + return [_array objectAtIndex:_index]; } @end @@ -735,6 +735,14 @@ return sorted; } +/*! + Return a copy of the receiver sorted using the function passed into the first parameter. +*/ +- (CPArray)sortedArrayUsingFunction:(Function)aFunction +{ + return [self sortedArrayUsingFunction:aFunction context:nil]; +} + /*! Returns an array in which the objects are ordered according to a sort with aFunction. This invokes