Fixed: Removed all warnings of conflicting return and parameter types caused by the new compiler

This commit is contained in:
Martin Carlberg committed 2013-08-12 16:46:14 +02:00
1 parent 1cfc8139b9
commit bb58a206a8
82 files changed
+202 -189

No files matched your search

+1 -1
View File
@@ -757,7 +757,7 @@ var bottomHeight = 71;
return @"alert";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"size": CGSizeMake(400.0, 110.0),
+1 -1
View File
@@ -76,7 +76,7 @@ CPBelowBottom = 6;
return @"box";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"background-color": [CPNull null],
+4 -4
View File
@@ -71,7 +71,7 @@
return "browser";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"image-control-resize": [CPNull null],
@@ -771,7 +771,7 @@
CPBrowser _browser @accessors;
}
- (void)initWithFrame:(CGRect)aFrame
- (id)initWithFrame:(CGRect)aFrame
{
if (self = [super initWithFrame:aFrame])
{
@@ -902,7 +902,7 @@
[_browser selectRowIndexes:selectedIndexes inColumn:_index];
}
- (id)childAtIndex:(unsigned)index
- (id)childAtIndex:(CPUInteger)index
{
return [_delegate browser:_browser child:index ofItem:_item];
}
@@ -995,7 +995,7 @@
[aCoder encodeObject:_highlightedBranchImage forKey:"_CPBrowserLeafViewHighlightedBranchImageKey"];
}
- (void)initWithCoder:(CPCoder)aCoder
- (id)initWithCoder:(CPCoder)aCoder
{
if (self = [super initWithCoder:aCoder])
{
+1 -1
View File
@@ -149,7 +149,7 @@ CPButtonImageOffset = 3.0;
return @"button";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"image": [CPNull null],
+1 -1
View File
@@ -79,7 +79,7 @@
return @"button-bar";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"resize-control-inset": CGInsetMake(0.0, 0.0, 0.0, 0.0),
+3 -3
View File
@@ -892,12 +892,12 @@ var HORIZONTAL_MARGIN = 2;
return CPNotFound;
}
- (CPCollectionViewItem)itemAtIndex:(unsigned)anIndex
- (CPCollectionViewItem)itemAtIndex:(CPUInteger)anIndex
{
return [_items objectAtIndex:anIndex];
}
- (CGRect)frameForItemAtIndex:(unsigned)anIndex
- (CGRect)frameForItemAtIndex:(CPUInteger)anIndex
{
return [[[self itemAtIndex:anIndex] view] frame];
}
@@ -1322,7 +1322,7 @@ Not supported. Use -collectionView:dataForItemsAtIndexes:fortype:
[self interpretKeyEvents:[anEvent]];
}
- (void)setAutoresizingMask:(int)aMask
- (void)setAutoresizingMask:(unsigned)aMask
{
[super setAutoresizingMask:0];
}
+2 -2
View File
@@ -576,7 +576,7 @@ var CPColorPanelSwatchesCookie = "CPColorPanelSwatchesCookie";
[aPasteboard setData:[CPKeyedArchiver archivedDataWithRootObject:_dragColor] forType:aType];
}
- (void)performDragOperation:(id <CPDraggingInfo>)aSender
- (void)performDragOperation:(id /*<CPDraggingInfo>*/)aSender
{
var location = [self convertPoint:[aSender draggingLocation] fromView:nil],
pasteboard = [aSender draggingPasteboard],
@@ -615,7 +615,7 @@ var CPColorPanelSwatchesCookie = "CPColorPanelSwatchesCookie";
return _colorPanel;
}
- (void)performDragOperation:(id <CPDraggingInfo>)aSender
- (void)performDragOperation:(id /*<CPDraggingInfo>*/)aSender
{
var pasteboard = [aSender draggingPasteboard];
+1 -1
View File
@@ -58,7 +58,7 @@ var _CPColorWellDidBecomeExclusiveNotification = @"_CPColorWellDidBecomeExclusiv
return @"colorwell";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"bezel-inset": CGInsetMakeZero(),
+5 -5
View File
@@ -58,7 +58,7 @@ var CPComboBoxTextSubview = @"text",
return "combobox";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"popup-button-size": CGSizeMake(21.0, 29.0),
@@ -171,7 +171,7 @@ var CPComboBoxTextSubview = @"text",
#pragma mark Setting a Delegate
- (id < CPComboBoxDelegate >)delegate
- (id /*< CPComboBoxDelegate >*/)delegate
{
return [super delegate];
}
@@ -182,7 +182,7 @@ var CPComboBoxTextSubview = @"text",
protocol, in actual fact it doesn't. Also note that the same
delegate may conform to the NSTextFieldDelegate protocol.
*/
- (void)setDelegate:(id < CPComboBoxDelegate >)aDelegate
- (void)setDelegate:(id /*< CPComboBoxDelegate >*/)aDelegate
{
var delegate = [self delegate];
@@ -231,7 +231,7 @@ var CPComboBoxTextSubview = @"text",
#pragma mark Setting a Data Source
- (id < CPComboBoxDataSource >)dataSource
- (id /*< CPComboBoxDataSource >*/)dataSource
{
if (!_usesDataSource)
[self _dataSourceWarningForMethod:_cmd condition:NO];
@@ -239,7 +239,7 @@ var CPComboBoxTextSubview = @"text",
return _dataSource;
}
- (void)setDataSource:(id < CPComboBoxDataSource >)aSource
- (void)setDataSource:(id /*< CPComboBoxDataSource >*/)aSource
{
if (!_usesDataSource)
[self _dataSourceWarningForMethod:_cmd condition:NO];
+3 -3
View File
@@ -322,11 +322,11 @@ var CPControlBlackColor = [CPColor blackColor];
_previousTrackingLocation = currentLocation;
}
- (void)setState:(int)state
- (void)setState:(CPInteger)state
{
}
- (int)nextState
- (CPInteger)nextState
{
return 0;
}
@@ -813,7 +813,7 @@ var CPControlBlackColor = [CPColor blackColor];
/*!
Returns the image scaling of the control.
*/
- (CPImageScaling)imageScaling
- (CPUInteger)imageScaling
{
return [self valueForThemeAttribute:@"image-scaling"];
}
+3 -3
View File
@@ -90,7 +90,7 @@ CPEraDatePickerElementFlag = 0x0100;
return @"datePicker";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"bezel-color": [CPColor clearColor],
@@ -159,7 +159,7 @@ CPEraDatePickerElementFlag = 0x0100;
return [super _binderClassForBinding:theBinding];
}
- (id)_replacementKeyPathForBinding:(CPString)aBinding
- (CPString)_replacementKeyPathForBinding:(CPString)aBinding
{
if (aBinding == CPValueBinding)
return @"dateValue";
@@ -269,7 +269,7 @@ CPEraDatePickerElementFlag = 0x0100;
/*! Return the objectValue of the datePicker. The objectValue should take the timeZoneEffect
*/
- (void)objectValue
- (id)objectValue
{
// TODO : add timeZone effect. How to do it because js ???
return _dateValue
+2 -2
View File
@@ -1059,7 +1059,7 @@ var CPShortWeekDayNameArrayEn = [@"Mo", @"Tu", @"We", @"Th", @"Fr", @"Sa", @"Su"
/*! Set a theme
*/
- (void)setThemeState:(CPThemeState)aState
- (BOOL)setThemeState:(CPThemeState)aState
{
[_textField setThemeState:aState];
[super setThemeState:aState];
@@ -1067,7 +1067,7 @@ var CPShortWeekDayNameArrayEn = [@"Mo", @"Tu", @"We", @"Th", @"Fr", @"Sa", @"Su"
/*! Unset a theme
*/
- (void)unsetThemeState:(CPThemeState)aState
- (BOOL)unsetThemeState:(CPThemeState)aState
{
[_textField unsetThemeState:aState];
[super unsetThemeState:aState];
+2 -2
View File
@@ -1356,7 +1356,7 @@ var CPMonthDateType = 0,
/*! Set the stringValue of the TextField. Add some zeros of there isn't 2/4 letters in the value. It's called at the end of the editing process
@param aStringValue a CPString
*/
- (void)setStringValue:(id)aStringValue
- (void)setStringValue:(CPString)aStringValue
{
if (_dateType == CPYearDateType)
{
@@ -1437,7 +1437,7 @@ var CPMonthDateType = 0,
/*! Return the objectValue of the textField. Needed for the binding.
This returns the objectValue relative to the dateValue
*/
- (void)objectValue
- (id)objectValue
{
var dateValue = [[_datePicker dateValue] copy];
+1 -1
View File
@@ -189,7 +189,7 @@ var IEFlashCLSID = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
return @"CPFV_" + [self UID];
}
- (void)mouseMoved:(id)sommit
- (void)mouseMoved:(CPEvent)sommit
{
[[[self window] platformWindow] _propagateCurrentDOMEvent:YES];
}
+2 -2
View File
@@ -267,7 +267,7 @@ var CPImageViewEmptyPlaceholderImage = nil;
[self setNeedsDisplay:YES];
}
- (unsigned)imageScaling
- (CPUInteger)imageScaling
{
return [self currentValueForThemeAttribute:@"image-scaling"];
}
@@ -502,7 +502,7 @@ var CPImageViewEmptyPlaceholderImage = nil;
[_source setImage:image];
}
- (void)valueForBinding:(CPString)aBinding
- (id)valueForBinding:(CPString)aBinding
{
var image = [_source image];
+1 -1
View File
@@ -62,7 +62,7 @@ CPRatingLevelIndicatorStyle = 3;
return "level-indicator";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"bezel-color": [CPNull null],
+4 -4
View File
@@ -278,7 +278,7 @@ var _CPMenuBarVisible = NO,
@param aMenuItem the item to insert
@param anIndex the index in the menu to insert the item.
*/
- (void)insertItem:(CPMenuItem)aMenuItem atIndex:(unsigned)anIndex
- (void)insertItem:(CPMenuItem)aMenuItem atIndex:(CPUInteger)anIndex
{
[self insertObject:aMenuItem inItemsAtIndex:anIndex];
}
@@ -291,7 +291,7 @@ var _CPMenuBarVisible = NO,
@param anIndex the index location in the menu for the new item
@return the new menu item
*/
- (CPMenuItem)insertItemWithTitle:(CPString)aTitle action:(SEL)anAction keyEquivalent:(CPString)aKeyEquivalent atIndex:(unsigned)anIndex
- (CPMenuItem)insertItemWithTitle:(CPString)aTitle action:(SEL)anAction keyEquivalent:(CPString)aKeyEquivalent atIndex:(CPUInteger)anIndex
{
var item = [[CPMenuItem alloc] initWithTitle:aTitle action:anAction keyEquivalent:aKeyEquivalent];
@@ -335,7 +335,7 @@ var _CPMenuBarVisible = NO,
Removes the item at the specified index from the menu
@param anIndex the index of the item to remove
*/
- (void)removeItemAtIndex:(unsigned)anIndex
- (void)removeItemAtIndex:(CPUInteger)anIndex
{
[self removeObjectFromItemsAtIndex:anIndex];
}
@@ -1060,7 +1060,7 @@ var _CPMenuBarVisible = NO,
Sends the action of the menu item at the specified index.
@param anIndex the index of the item
*/
- (void)performActionForItemAtIndex:(unsigned)anIndex
- (void)performActionForItemAtIndex:(CPUInteger)anIndex
{
var item = _items[anIndex];
+1 -1
View File
@@ -434,7 +434,7 @@ _CPMenuWindowAttachedMenuBackgroundStyle = 2;
return "menu-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"menu-window-more-above-image": [CPNull null],
+1 -1
View File
@@ -49,7 +49,7 @@
return "menu-item-bar-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"horizontal-margin": 9.0,
+1 -1
View File
@@ -45,7 +45,7 @@
return "menu-item-standard-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"submenu-indicator-color": [CPNull null],
+1 -1
View File
@@ -53,7 +53,7 @@
return "menu-item-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{};
}
+5 -5
View File
@@ -51,7 +51,7 @@
CPCountedSet _observedKeys;
}
+ (id)initialize
+ (void)initialize
{
if (self !== [CPObjectController class])
return;
@@ -572,7 +572,7 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo
}
}
- (void)insertObject:(id)anObject atIndex:(unsigned)anIndex
- (void)insertObject:(id)anObject atIndex:(CPUInteger)anIndex
{
for (var i = 0, count = [_observationProxies count]; i < count; i++)
{
@@ -592,7 +592,7 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo
[super insertObject:anObject atIndex:anIndex];
}
- (void)removeObjectAtIndex:(unsigned)anIndex
- (void)removeObjectAtIndex:(CPUInteger)anIndex
{
var currentObject = [self objectAtIndex:anIndex];
@@ -614,7 +614,7 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo
[super removeObjectAtIndex:anIndex];
}
- (_CPObservableArray)objectsAtIndexes:(CPIndexSet)theIndexes
- (CPArray)objectsAtIndexes:(CPIndexSet)theIndexes
{
return [_CPObservableArray arrayWithArray:[super objectsAtIndexes:theIndexes]];
}
@@ -629,7 +629,7 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo
[self removeObjectAtIndex:[self count]];
}
- (void)replaceObjectAtIndex:(unsigned)anIndex withObject:(id)anObject
- (void)replaceObjectAtIndex:(CPUInteger)anIndex withObject:(id)anObject
{
var currentObject = [self objectAtIndex:anIndex];
+3 -3
View File
@@ -1803,7 +1803,7 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt
return [_outlineView itemAtRow:theRow];
}
- (CPDragOperation)tableView:(CPTableView)aTableView validateDrop:(id < CPDraggingInfo >)theInfo
- (CPDragOperation)tableView:(CPTableView)aTableView validateDrop:(id /*< CPDraggingInfo >*/)theInfo
proposedRow:(int)theRow proposedDropOperation:(CPTableViewDropOperation)theOperation
{
if (!(_outlineView._implementedOutlineViewDataSourceMethods & CPOutlineViewDataSource_outlineView_validateDrop_proposedItem_proposedChildIndex_))
@@ -1823,7 +1823,7 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt
return [_outlineView._outlineViewDataSource outlineView:_outlineView validateDrop:theInfo proposedItem:parentItem proposedChildIndex:childIndex];
}
- (BOOL)tableView:(CPTableView)aTableView acceptDrop:(id <CPDraggingInfo>)theInfo row:(int)theRow dropOperation:(CPTableViewDropOperation)theOperation
- (BOOL)tableView:(CPTableView)aTableView acceptDrop:(id /*<CPDraggingInfo>*/)theInfo row:(int)theRow dropOperation:(CPTableViewDropOperation)theOperation
{
if (!(_outlineView._implementedOutlineViewDataSourceMethods & CPOutlineViewDataSource_outlineView_acceptDrop_item_childIndex_))
return NO;
@@ -1940,7 +1940,7 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt
return self;
}
- (void)setState:(CPState)aState
- (void)setState:(CPInteger)aState
{
[super setState:aState];
+5 -5
View File
@@ -279,7 +279,7 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
Selects the item at the specified index
@param anIndex the index of the item to select
*/
- (void)setObjectValue:(int)anIndex
- (void)setObjectValue:(id)anIndex
{
var indexOfSelectedItem = [self objectValue];
@@ -344,7 +344,7 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
Returns the item at the specified index or \c nil if the item does not exist.
@param anIndex the index of the item to obtain
*/
- (CPMenuItem)itemAtIndex:(unsigned)anIndex
- (CPMenuItem)itemAtIndex:(CPUInteger)anIndex
{
return [[self menu] itemAtIndex:anIndex];
}
@@ -353,7 +353,7 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
Returns the title of the item at the specified index or \c nil if no item exists.
@param anIndex the index of the item
*/
- (CPString)itemTitleAtIndex:(unsigned)anIndex
- (CPString)itemTitleAtIndex:(CPUInteger)anIndex
{
return [[[self menu] itemAtIndex:anIndex] title];
}
@@ -838,7 +838,7 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
[self _setContentValuesIfNeeded:contentArray];
}
- (void)valueForBinding:(CPString)aBinding
- (id)valueForBinding:(CPString)aBinding
{
return [self _content];
}
@@ -910,7 +910,7 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
{
}
- (void)setValue:(id)aValue forBinding:(CPString)aBinding
- (void)setValue:(CPArray)aValue forBinding:(CPString)aBinding
{
[super _setContent:aValue];
}
+1 -1
View File
@@ -152,7 +152,7 @@ CPRadioImageOffset = 4.0;
[_radioGroup _setSelectedRadio:self];
}
- (void)sendAction:(SEL)anAction to:(id)anObject
- (BOOL)sendAction:(SEL)anAction to:(id)anObject
{
[super sendAction:anAction to:anObject];
+4 -4
View File
@@ -484,7 +484,7 @@
#pragma mark RuleEditor delegate methods
- (int)_queryNumberOfChildrenOfItem:(id)rowItem withRowType:(int)type
- (int)_queryNumberOfChildrenOfItem:(id)rowItem withRowType:(CPRuleEditorRowType)type
{
if (rowItem == nil)
{
@@ -494,7 +494,7 @@
return [[rowItem children] count];
}
- (id)_queryChild:(int)childIndex ofItem:(id)rowItem withRowType:(int)type
- (id)_queryChild:(int)childIndex ofItem:(id)rowItem withRowType:(CPRuleEditorRowType)type
{
if (rowItem == nil)
{
@@ -516,7 +516,7 @@ var CPPredicateTemplatesKey = @"CPPredicateTemplates";
@implementation CPPredicateEditor (CPCoding)
- (id)initWithCoder:(id)aCoder
- (id)initWithCoder:(CPCoder)aCoder
{
self = [super initWithCoder:aCoder];
@@ -531,7 +531,7 @@ var CPPredicateTemplatesKey = @"CPPredicateTemplates";
return self;
}
- (void)encodeWithCoder:(id)aCoder
- (void)encodeWithCoder:(CPCoder)aCoder
{
[super encodeWithCoder:aCoder];
[aCoder encodeObject:_allTemplates forKey:CPPredicateTemplatesKey];
+12 -12
View File
@@ -122,7 +122,7 @@ var CPRuleEditorItemPBoardType = @"CPRuleEditorItemPBoardType",
return @"rule-editor";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"alternating-row-colors": [CPNull null],
@@ -1684,7 +1684,7 @@ TODO: implement
[super bind:aBinding toObject:observableController withKeyPath:aKeyPath options:options];
}
- (void)unbind:(id)object
- (void)unbind:(CPString)object
{
_rowClass = [_CPRuleEditorRowObject class];
[super unbind:object];
@@ -2128,7 +2128,7 @@ TODO: implement
return YES;
}
- (CPDragOperation)draggingEntered:(id < CPDraggingInfo >)sender
- (CPDragOperation)draggingEntered:(id /*< CPDraggingInfo >*/)sender
{
if ([sender draggingSource] === self)
{
@@ -2158,7 +2158,7 @@ TODO: implement
_subviewIndexOfDropLine = CPNotFound;
}
- (CPDragOperation)draggingUpdated:(id <CPDraggingInfo>)sender
- (CPDragOperation)draggingUpdated:(id /*<CPDraggingInfo>*/)sender
{
var point = [self convertPoint:[sender draggingLocation] fromView:nil],
y = point.y + _sliceHeight / 2,
@@ -2195,12 +2195,12 @@ TODO: implement
return CPDragOperationMove;
}
- (BOOL)prepareForDragOperation:(id < CPDraggingInfo >)sender
- (BOOL)prepareForDragOperation:(id /*< CPDraggingInfo >*/)sender
{
return (_subviewIndexOfDropLine !== CPNotFound);
}
- (BOOL)performDragOperation:(id < CPDraggingInfo >)info
- (BOOL)performDragOperation:(id /*< CPDraggingInfo >*/)info
{
var aboveInsertIndexCount = 0,
object,
@@ -2262,7 +2262,7 @@ TODO: implement
{
}
- (void)_setWindow:(id)window
- (void)_setWindow:(CPWindow)window
{
[super _setWindow:window];
}
@@ -2426,7 +2426,7 @@ var CPRuleEditorAlignmentGridWidthKey = @"CPRuleEditorAlignmentGridWidth",
return self;
}
- (void)encodeWithCoder:(id)coder
- (void)encodeWithCoder:(CPCoder)coder
{
[super encodeWithCoder:coder];
@@ -2481,7 +2481,7 @@ var CriteriaKey = @"criteria",
return "<" + [self className] + ">\nsubrows = " + [subrows description] + "\ncriteria = " + [criteria description] + "\ndisplayValues = " + [displayValues description];
}
- (id)initWithCoder:(id)coder
- (id)initWithCoder:(CPCoder)coder
{
self = [super init];
if (self !== nil)
@@ -2495,7 +2495,7 @@ var CriteriaKey = @"criteria",
return self;
}
- (void)encodeWithCoder:(id)coder
- (void)encodeWithCoder:(CPCoder)coder
{
[coder encodeObject:subrows forKey:SubrowsKey];
[coder encodeObject:criteria forKey:CriteriaKey];
@@ -2534,7 +2534,7 @@ var CPBoundArrayKey = @"CPBoundArray";
return self;
}
- (id)initWithCoder:(id)coder
- (id)initWithCoder:(CPCoder)coder
{
if (self = [super init])
boundArray = [coder decodeObjectForKey:CPBoundArrayKey];
@@ -2542,7 +2542,7 @@ var CPBoundArrayKey = @"CPBoundArray";
return self;
}
- (void)encodeWithCoder:(id)coder
- (void)encodeWithCoder:(CPCoder)coder
{
[coder encodeObject:boundArray forKey:CPBoundArrayKey];
}
@@ -86,7 +86,7 @@ else if (CPBrowserIsEngine(CPInternetExplorerBrowserEngine))
return self;
}
- (id)hitTest:(CGPoint)point
- (CPView)hitTest:(CGPoint)point
{
if (!CGRectContainsPoint([self frame], point) || ![self sliceIsEditable])
return nil;
@@ -100,12 +100,12 @@ else if (CPBrowserIsEngine(CPInternetExplorerBrowserEngine))
return ![superview isKindOfClass:[_CPRuleEditorViewSlice]] || [superview isEditable];
}
- (BOOL)trackMouse:(CPEvent)theEvent
- (void)trackMouse:(CPEvent)theEvent
{
if (![self sliceIsEditable])
return NO;
return;
return [super trackMouse:theEvent];
[super trackMouse:theEvent];
}
- (CGRect)contentRectForBounds:(CGRect)bounds
@@ -522,7 +522,7 @@ var CONTROL_HEIGHT = 16.,
return self;
}
- (id)hitTest:(CGPoint)point
- (CPView)hitTest:(CGPoint)point
{
if (!CGRectContainsPoint([self frame], point))
return nil;
+1 -1
View File
@@ -108,7 +108,7 @@ CPThemeStateScrollerKnobDark = CPThemeState("scroller-knob-dark");
return "scroller";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"scroller-width": 7.0,
+1 -1
View File
@@ -458,7 +458,7 @@ var RECENT_SEARCH_PREFIX = @" ";
[self sendAction:[self action] to:[self target]];
}
- (void)sendAction:(SEL)anAction to:(id)anObject
- (BOOL)sendAction:(SEL)anAction to:(id)anObject
{
[super sendAction:anAction to:anObject];
+1 -1
View File
@@ -56,7 +56,7 @@ CPSegmentSwitchTrackingMomentary = 2;
return "segmented-control";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"alignment": CPCenterTextAlignment,
+1 -1
View File
@@ -47,7 +47,7 @@ CPThemeStateShadowViewHeavy = CPThemeState("shadowview-style-heavy");
return "shadow-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"bezel-color": [CPNull null],
+1 -1
View File
@@ -49,7 +49,7 @@ CPCircularSlider = 1;
return "slider";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"knob-color": [CPNull null],
+2 -2
View File
@@ -103,7 +103,7 @@ var ShouldSuppressResizeNotifications = 1,
return @"splitview";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"divider-thickness": 1.0,
@@ -995,7 +995,7 @@ The sum of the views and the sum of the dividers should be equal to the size of
@param unsigned int - The divider index the button bar will be assigned to.
*/
// FIXME Should be renamed to setButtonBar:ofDividerAtIndex:.
- (void)setButtonBar:(CPButtonBar)aButtonBar forDividerAtIndex:(unsigned)dividerIndex
- (void)setButtonBar:(CPButtonBar)aButtonBar forDividerAtIndex:(CPUInteger)dividerIndex
{
if (!aButtonBar)
{
+2 -2
View File
@@ -213,7 +213,7 @@
Set the current value of the stepper.
@param aValue a float containing the value
*/
- (void)setDoubleValue:(float)aValue
- (void)setDoubleValue:(double)aValue
{
if (aValue > _maxValue)
[super setDoubleValue:_valueWraps ? _minValue : _maxValue];
@@ -267,7 +267,7 @@
return @"stepper";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"bezel-color-up-button": [CPNull null],
+3 -3
View File
@@ -107,7 +107,7 @@ var CPTabViewDidSelectTabViewItemSelector = 1,
@param aTabViewItem the item to insert
@param anIndex the index for the item
*/
- (void)insertTabViewItem:(CPTabViewItem)aTabViewItem atIndex:(unsigned)anIndex
- (void)insertTabViewItem:(CPTabViewItem)aTabViewItem atIndex:(CPUInteger)anIndex
{
[_items insertObject:aTabViewItem atIndex:anIndex];
@@ -183,7 +183,7 @@ var CPTabViewDidSelectTabViewItemSelector = 1,
Returns the CPTabViewItem at the specified index.
@return a tab view item, or nil
*/
- (CPTabViewItem)tabViewItemAtIndex:(unsigned)anIndex
- (CPTabViewItem)tabViewItemAtIndex:(CPUInteger)anIndex
{
return [_items objectAtIndex:anIndex];
}
@@ -270,7 +270,7 @@ var CPTabViewDidSelectTabViewItemSelector = 1,
Selects the item at the specified index.
@param anIndex the index of the item to display.
*/
- (BOOL)selectTabViewItemAtIndex:(unsigned)anIndex
- (BOOL)selectTabViewItemAtIndex:(CPUInteger)anIndex
{
if (anIndex === _selectedIndex)
return;
+1 -1
View File
@@ -595,7 +595,7 @@ CPTableColumnUserResizingMask = 1 << 1;
@implementation CPTableColumn (Bindings)
+ (id)_binderClassForBinding:(CPString)aBinding
+ (Class)_binderClassForBinding:(CPString)aBinding
{
if (aBinding == CPValueBinding)
return [CPTableColumnValueBinder class];
+3 -3
View File
@@ -43,7 +43,7 @@
return @"columnHeader";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"background-color": [CPNull null],
@@ -57,7 +57,7 @@
};
}
- (void)initWithFrame:(CGRect)frame
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
@@ -246,7 +246,7 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
return @"tableHeaderRow";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"background-color": [CPNull null],
+6 -6
View File
@@ -286,7 +286,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
/*!
@ignore
*/
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"alternating-row-colors": [CPNull null],
@@ -5142,7 +5142,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
/*!
@ignore
*/
- (id)hitTest:(CGPoint)aPoint
- (CPView)hitTest:(CGPoint)aPoint
{
var hit = [super hitTest:aPoint];
@@ -5368,7 +5368,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
@implementation CPTableView (Bindings)
+ (id)_binderClassForBinding:(CPString)aBinding
+ (Class)_binderClassForBinding:(CPString)aBinding
{
if (aBinding == @"content")
return [CPTableContentBinder class];
@@ -5425,7 +5425,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
id _content @accessors(property=content);
}
- (void)setValueFor:(id)aBinding
- (void)setValueFor:(CPString)aBinding
{
var destination = [_info objectForKey:CPObservedObjectKey],
keyPath = [_info objectForKey:CPObservedKeyPathKey];
@@ -5738,13 +5738,13 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
[self setThemeState:CPThemeStateTableDataView];
}
- (void)setThemeState:(CPThemeState)aState
- (BOOL)setThemeState:(CPThemeState)aState
{
[super setThemeState:aState];
[self recursivelyPerformSelector:@selector(setThemeState:) withObject:aState startingFrom:self];
}
- (void)unsetThemeState:(CPThemeState)aState
- (BOOL)unsetThemeState:(CPThemeState)aState
{
[super unsetThemeState:aState];
[self recursivelyPerformSelector:@selector(unsetThemeState:) withObject:aState startingFrom:self];
+2 -2
View File
@@ -209,7 +209,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
return "textfield";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"bezel-inset": CGInsetMakeZero(),
@@ -1719,7 +1719,7 @@ var CPTextFieldIsEditableKey = "CPTextFieldIsEditableKey",
@implementation _CPTextFieldValueBinder : CPBinder
- (void)_updatePlaceholdersWithOptions:(CPDictionary)options forBinding:(CPBinder)aBinding
- (void)_updatePlaceholdersWithOptions:(CPDictionary)options forBinding:(CPString)aBinding
{
[super _updatePlaceholdersWithOptions:options];
+5 -5
View File
@@ -98,7 +98,7 @@ CPTokenFieldDeleteButtonType = 1;
return "tokenfield";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{ @"editor-inset": CGInsetMakeZero() };
}
@@ -645,7 +645,7 @@ CPTokenFieldDeleteButtonType = 1;
[[self _tokens] makeObjectsPerformSelector:@selector(setEditable:) withObject:shouldBeEditable];
}
- (void)sendAction:(SEL)anAction to:(id)anObject
- (BOOL)sendAction:(SEL)anAction to:(id)anObject
{
_shouldNotifyTarget = NO;
[super sendAction:anAction to:anObject];
@@ -653,7 +653,7 @@ CPTokenFieldDeleteButtonType = 1;
// Incredible hack to disable supers implementation
// so it cannot change our object value and break the tokenfield
- (void)_setStringValue:(id)aValue
- (BOOL)_setStringValue:(CPString)aValue
{
}
@@ -1541,7 +1541,7 @@ CPTokenFieldDeleteButtonType = 1;
{
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
var attributes = [CPButton themeAttributes];
@@ -1571,7 +1571,7 @@ CPTokenFieldDeleteButtonType = 1;
{
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
var attributes = [CPButton themeAttributes];
+2 -2
View File
@@ -594,7 +594,7 @@ var _CPToolbarItemInfoMake = function(anIndex, aView, aLabel, aMinWidth)
return @"toolbar-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"item-margin": 10.0,
@@ -1216,7 +1216,7 @@ var LABEL_MARGIN = 2.0;
[_labelField setTextShadowColor:[self FIXME_labelShadowColor]];
}
- (void)sendAction:(SEL)anAction to:(id)aSender
- (BOOL)sendAction:(SEL)anAction to:(id)aSender
{
[CPApp sendAction:anAction to:aSender from:_toolbarItem];
}
+1 -1
View File
@@ -105,7 +105,7 @@ CPViewAnimationFadeOutEffect = @"CPViewAnimationFadeOutEffect";
[super startAnimation];
}
- (void)setCurrentProgress:(CPAnimationProgress)progress
- (void)setCurrentProgress:(float)progress
{
[super setCurrentProgress:progress];
+1 -1
View File
@@ -248,7 +248,7 @@ CPTexturedBackgroundWindowMask
@param aStyleMask a style mask
@return the initialized window
*/
- (id)initWithContentRect:(CGRect)aContentRect styleMask:(unsigned int)aStyleMask
- (id)initWithContentRect:(CGRect)aContentRect styleMask:(unsigned)aStyleMask
{
self = [super init];
@@ -32,7 +32,7 @@
return @"bordeless-bridge-window-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"toolbar-background-color": [CPColor grayColor],
+1 -1
View File
@@ -33,7 +33,7 @@
return @"doc-modal-window-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"body-color": [CPColor whiteColor],
+1 -1
View File
@@ -50,7 +50,7 @@ var _CPPopoverWindowViewDefaultCursorSize = CGSizeMake(16, 10);
return @"popover-window-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"background-gradient": [CPNull null],
+1 -1
View File
@@ -41,7 +41,7 @@
return @"shadow-window-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{};
}
+2 -2
View File
@@ -41,7 +41,7 @@ var _CPStandardWindowViewDividerViewHeight = 1.0;
return @"textured-window-head-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{};
}
@@ -108,7 +108,7 @@ var _CPStandardWindowViewDividerViewHeight = 1.0;
return @"standard-window-view";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"gradient-height": [CPNull null],
+1 -1
View File
@@ -38,7 +38,7 @@
return @"tooltip";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"stroke-color": [CPColor colorWithHexString:@"E3E3E3"],
+1 -1
View File
@@ -81,7 +81,7 @@ _CPWindowViewResizeSlop = 3;
return "window";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"title-bar-height": 25,
+1 -1
View File
@@ -687,7 +687,7 @@ if (_DOMContentsElement && aLayer._zPosition > _DOMContentsElement.style.zIndex)
@param aLayer the layer to insert
@param anIndex the index to insert the layer at
*/
- (void)insertSublayer:(CALayer)aLayer atIndex:(unsigned)anIndex
- (void)insertSublayer:(CALayer)aLayer atIndex:(CPUInteger)anIndex
{
if (!aLayer)
return;
+1 -1
View File
@@ -75,7 +75,7 @@ var CAMediaNamedTimingFunctions = nil;
return self;
}
- (void)getControlPointAtIndex:(unsigned)anIndex values:(float/*[2]*/)reference
- (void)getControlPointAtIndex:(CPUInteger)anIndex values:(float/*[2]*/)reference
{
if (anIndex == 0)
{
+1 -1
View File
@@ -78,7 +78,7 @@
aWindow._isVisible = NO;
}
- (void)insertWindow:(CPWindow)aWindow atIndex:(unsigned)anIndex
- (void)insertWindow:(CPWindow)aWindow atIndex:(CPUInteger)anIndex
{
// We will have to adjust the z-index of all windows starting at this index.
var count = [_windows count],
+1 -1
View File
@@ -280,7 +280,7 @@ var _CPAutocompleteMenuMaximumHeight = 307;
@implementation _CPAutocompleteWindow : CPPanel
- (id)initWithContentRect:(CGRect)aContentRect styleMask:(unsigned int)aStyleMask
- (id)initWithContentRect:(CGRect)aContentRect styleMask:(unsigned)aStyleMask
{
if (self = [super initWithContentRect:aContentRect styleMask:aStyleMask])
_constrainsToUsableScreen = NO;
+1 -1
View File
@@ -31,7 +31,7 @@
return @"cornerview";
}
+ (id)themeAttributes
+ (CPDictionary)themeAttributes
{
return @{
@"background-color": [CPNull null],
+1 -1
View File
@@ -218,7 +218,7 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0,
[self setNeedsLayout];
}
- (void)imageScaling
- (CPUInteger)imageScaling
{
return _imageScaling;
}
+1 -1
View File
@@ -853,7 +853,7 @@ var _CPPopUpListDataSourceKey = @"_CPPopUpListDataSourceKey",
@implementation _CPPopUpPanel : CPPanel
- (id)initWithContentRect:(CGRect)aContentRect styleMask:(unsigned int)aStyleMask
- (id)initWithContentRect:(CGRect)aContentRect styleMask:(unsigned)aStyleMask
{
if (self = [super initWithContentRect:aContentRect styleMask:aStyleMask])
_constrainsToUsableScreen = NO;
+1 -1
View File
@@ -399,7 +399,7 @@ var _CPPopoverWindow_shouldClose_ = 1 << 0,
@param sender the sender of the action
*/
- (IBAction)orderFront:(is)aSender
- (IBAction)orderFront:(id)aSender
{
if (![self isKeyWindow])
{
+1 -1
View File
@@ -598,7 +598,7 @@ Use descriptive parameter types, despite not being fully supported in JavaScript
##### Right:
- (char)characterAtIndex:(unsigned)anIndex;
- (char)characterAtIndex:(CPUInteger)anIndex;
- (void)insertObject:(id)anObject;
##### Wrong:
+10 -10
View File
@@ -197,7 +197,7 @@
[_proxyObject setValue:anObject forKey:_key];
}
- (unsigned)count
- (CPUInteger)count
{
if (_count)
return _count(_proxyObject, _countSEL);
@@ -205,7 +205,7 @@
return [[self _representedObject] count];
}
- (int)indexOfObject:(CPObject)anObject inRange:(CPRange)aRange
- (CPUInteger)indexOfObject:(id)anObject inRange:(CPRange)aRange
{
var index = aRange.location,
count = aRange.length,
@@ -222,12 +222,12 @@
return CPNotFound;
}
- (int)indexOfObject:(CPObject)anObject
- (CPUInteger)indexOfObject:(id)anObject
{
return [self indexOfObject:anObject inRange:CPMakeRange(0, [self count])];
}
- (int)indexOfObjectIdenticalTo:(CPObject)anObject inRange:(CPRange)aRange
- (CPUInteger)indexOfObjectIdenticalTo:(id)anObject inRange:(CPRange)aRange
{
var index = aRange.location,
count = aRange.length;
@@ -239,12 +239,12 @@
return CPNotFound;
}
- (int)indexOfObjectIdenticalTo:(CPObject)anObject
- (CPUInteger)indexOfObjectIdenticalTo:(id)anObject
{
return [self indexOfObjectIdenticalTo:anObject inRange:CPMakeRange(0, [self count])];
}
- (id)objectAtIndex:(unsigned)anIndex
- (id)objectAtIndex:(CPUInteger)anIndex
{
return [[self objectsAtIndexes:[CPIndexSet indexSetWithIndex:anIndex]] firstObject];
}
@@ -281,7 +281,7 @@
[self insertObjects:anArray atIndexes:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange([self count], count)]];
}
- (void)insertObject:(id)anObject atIndex:(unsigned)anIndex
- (void)insertObject:(id)anObject atIndex:(CPUInteger)anIndex
{
[self insertObjects:[anObject] atIndexes:[CPIndexSet indexSetWithIndex:anIndex]];
}
@@ -378,7 +378,7 @@
[self removeObjectsAtIndexes:[CPIndexSet indexSetWithIndex:[self count] - 1]];
}
- (void)removeObjectAtIndex:(unsigned)anIndex
- (void)removeObjectAtIndex:(CPUInteger)anIndex
{
[self removeObjectsAtIndexes:[CPIndexSet indexSetWithIndex:anIndex]];
}
@@ -405,7 +405,7 @@
}
}
- (void)replaceObjectAtIndex:(unsigned)anIndex withObject:(id)anObject
- (void)replaceObjectAtIndex:(CPUInteger)anIndex withObject:(id)anObject
{
[self replaceObjectsAtIndexes:[CPIndexSet indexSetWithIndex:anIndex] withObjects:[anObject]]
}
@@ -564,7 +564,7 @@
/*!
Registers an observer to receive key value observer notifications for the specified key-path relative to the objects at the indexes.
*/
- (void)addObserver:(id)anObserver toObjectsAtIndexes:(CPIndexSet)indexes forKeyPath:(CPString)aKeyPath options:(unsigned)options context:(id)context
- (void)addObserver:(id)anObserver toObjectsAtIndexes:(CPIndexSet)indexes forKeyPath:(CPString)aKeyPath options:(CPKeyValueObservingOptions)options context:(id)context
{
var index = [indexes firstIndex];
+7 -7
View File
@@ -21,7 +21,7 @@
items. Because CPArray is backed by JavaScript arrays,
this method ends up simply returning a regular array.
*/
+ (CPArray)arrayWithCapacity:(unsigned)aCapacity
+ (CPArray)arrayWithCapacity:(CPUInteger)aCapacity
{
return [[self alloc] initWithCapacity:aCapacity];
}
@@ -30,7 +30,7 @@
Initializes an array able to store at least \c aCapacity items. Because CPArray
is backed by JavaScript arrays, this method ends up simply returning a regular array.
*/
/*- (id)initWithCapacity:(unsigned)aCapacity
/*- (id)initWithCapacity:(CPUInteger)aCapacity
{
return self;
}*/
@@ -63,7 +63,7 @@
@param anObject the object to insert into the array
@param anIndex the location to insert \c anObject at
*/
- (void)insertObject:(id)anObject atIndex:(int)anIndex
- (void)insertObject:(id)anObject atIndex:(CPUInteger)anIndex
{
_CPRaiseInvalidAbstractInvocation(self, _cmd);
}
@@ -93,7 +93,7 @@
[self insertObject:[objects objectAtIndex:index] atIndex:currentIndex];
}
- (unsigned)insertObject:(id)anObject inArraySortedByDescriptors:(CPArray)descriptors
- (CPUInteger)insertObject:(id)anObject inArraySortedByDescriptors:(CPArray)descriptors
{
var index,
count = [descriptors count];
@@ -126,7 +126,7 @@
The current element at position \c anIndex will be removed from the array.
@param anIndex the position in the array to place \c anObject
*/
- (void)replaceObjectAtIndex:(int)anIndex withObject:(id)anObject
- (void)replaceObjectAtIndex:(CPUInteger)anIndex withObject:(id)anObject
{
_CPRaiseInvalidAbstractInvocation(self, _cmd);
}
@@ -241,7 +241,7 @@
Removes the object at \c anIndex.
@param anIndex the location of the element to be removed
*/
- (void)removeObjectAtIndex:(int)anIndex
- (void)removeObjectAtIndex:(CPUInteger)anIndex
{
_CPRaiseInvalidAbstractInvocation(self, _cmd);
}
@@ -322,7 +322,7 @@
@param anIndex the first index to swap from
@param otherIndex the second index to swap from
*/
- (void)exchangeObjectAtIndex:(unsigned)anIndex withObjectAtIndex:(unsigned)otherIndex
- (void)exchangeObjectAtIndex:(CPUInteger)anIndex withObjectAtIndex:(CPUInteger)otherIndex
{
if (anIndex === otherIndex)
return;
+5 -5
View File
@@ -122,7 +122,7 @@ var concat = Array.prototype.concat,
@param aCount the number of objects in the JS Array
@return a new CPArray containing the specified objects
*/
+ (id)arrayWithObjects:(id)objects count:(unsigned)aCount
+ (id)arrayWithObjects:(id)objects count:(CPUInteger)aCount
{
return [[self alloc] initWithObjects:objects count:aCount];
}
@@ -174,13 +174,13 @@ var concat = Array.prototype.concat,
@param aCount the number of objects in \c objects
@return the initialized CPArray
*/
- (id)initWithObjects:(id)objects count:(unsigned)aCount
- (id)initWithObjects:(CPArray)objects count:(CPUInteger)aCount
{
FORWARD_TO_CONCRETE_CLASS();
}
// FIXME: This should be defined in CPMutableArray, not here.
- (id)initWithCapacity:(unsigned)aCapacity
- (id)initWithCapacity:(CPUInteger)aCapacity
{
FORWARD_TO_CONCRETE_CLASS();
}
@@ -203,7 +203,7 @@ var concat = Array.prototype.concat,
/*!
Returns the number of elements in the array
*/
- (int)count
- (CPUInteger)count
{
_CPRaiseInvalidAbstractInvocation(self, _cmd);
}
@@ -238,7 +238,7 @@ var concat = Array.prototype.concat,
Returns the object at index \c anIndex.
@throws CPRangeException if \c anIndex is out of bounds
*/
- (id)objectAtIndex:(int)anIndex
- (id)objectAtIndex:(CPUInteger)anIndex
{
_CPRaiseInvalidAbstractInvocation(self, _cmd);
}
+6 -6
View File
@@ -19,7 +19,7 @@ var concat = Array.prototype.concat,
return [];
}
+ (CPArray)array
+ (id)array
{
return [];
}
@@ -107,7 +107,7 @@ var concat = Array.prototype.concat,
return self;
}
- (BOOL)count
- (CPUInteger)count
{
return self.length;
}
@@ -230,7 +230,7 @@ var concat = Array.prototype.concat,
return join.call(self, aString);
}
- (void)insertObject:(id)anObject atIndex:(int)anIndex
- (void)insertObject:(id)anObject atIndex:(CPUInteger)anIndex
{
if (anIndex > self.length || anIndex < 0)
_CPRaiseRangeException(self, _cmd, anIndex, self.length);
@@ -238,7 +238,7 @@ var concat = Array.prototype.concat,
splice.call(self, anIndex, 0, anObject);
}
- (void)removeObjectAtIndex:(int)anIndex
- (void)removeObjectAtIndex:(CPUInteger)anIndex
{
if (anIndex >= self.length || anIndex < 0)
_CPRaiseRangeException(self, _cmd, anIndex, self.length);
@@ -289,7 +289,7 @@ var concat = Array.prototype.concat,
splice.call(self, aRange.location, aRange.length);
}
- (void)replaceObjectAtIndex:(int)anIndex withObject:(id)anObject
- (void)replaceObjectAtIndex:(CPUInteger)anIndex withObject:(id)anObject
{
if (anIndex >= self.length || anIndex < 0)
_CPRaiseRangeException(self, _cmd, anIndex, self.length);
@@ -333,7 +333,7 @@ var concat = Array.prototype.concat,
}
- (void)copy
- (id)copy
{
return slice.call(self, 0);
}
+5 -5
View File
@@ -179,7 +179,7 @@
character at index \c anIndex. Returns an empty dictionary if index
is out of bounds.
*/
- (CPDictionary)attributesAtIndex:(unsigned)anIndex effectiveRange:(CPRangePointer)aRange
- (CPDictionary)attributesAtIndex:(CPUInteger)anIndex effectiveRange:(CPRangePointer)aRange
{
// find the range entry that contains anIndex.
var entryIndex = [self _indexOfEntryWithIndex:anIndex];
@@ -219,7 +219,7 @@
character at index \c anIndex. Returns an empty dictionary if index
is out of bounds.
*/
- (CPDictionary)attributesAtIndex:(unsigned)anIndex longestEffectiveRange:(CPRangePointer)aRange inRange:(CPRange)rangeLimit
- (CPDictionary)attributesAtIndex:(CPUInteger)anIndex longestEffectiveRange:(CPRangePointer)aRange inRange:(CPRange)rangeLimit
{
var startingEntryIndex = [self _indexOfEntryWithIndex:anIndex];
@@ -295,7 +295,7 @@
@return the named attribute or \c nil is the attribute does not
exist.
*/
- (id)attribute:(CPString)attribute atIndex:(unsigned)index effectiveRange:(CPRangePointer)aRange
- (id)attribute:(CPString)attribute atIndex:(CPUInteger)index effectiveRange:(CPRangePointer)aRange
{
if (!attribute)
{
@@ -332,7 +332,7 @@
@return the named attribute or \c nil is the attribute does not
exist.
*/
- (id)attribute:(CPString)attribute atIndex:(unsigned)anIndex longestEffectiveRange:(CPRangePointer)aRange inRange:(CPRange)rangeLimit
- (id)attribute:(CPString)attribute atIndex:(CPUInteger)anIndex longestEffectiveRange:(CPRangePointer)aRange inRange:(CPRange)rangeLimit
{
var startingEntryIndex = [self _indexOfEntryWithIndex:anIndex];
@@ -690,7 +690,7 @@
@param anIndex the index at which the insert is to occur.
@exception CPRangeException If the index is out of bounds.
*/
- (void)insertAttributedString:(CPAttributedString)aString atIndex:(unsigned)anIndex
- (void)insertAttributedString:(CPAttributedString)aString atIndex:(CPUInteger)anIndex
{
if (anIndex < 0 || anIndex > [self length])
[CPException raise:CPRangeException reason:"tried to insert attributed string at an invalid index: "+anIndex];
+1 -1
View File
@@ -214,7 +214,7 @@ var CPByteCountFormatterUnits = [ @"bytes", @"KB", @"MB", @"GB", @"TB", @"PB" ];
return nil;
}
- (BOOL)getObjectValue:(id)anObject forString:(CPString)aString errorDescription:(CPString)anError
- (BOOL)getObjectValue:(idRef)anObject forString:(CPString)aString errorDescription:(CPStringRef)anError
{
// Not implemented
return NO;
+1 -1
View File
@@ -1201,7 +1201,7 @@ var defaultDateFormatterBehavior = CPDateFormatterBehavior10_4,
@param anError, if it returns NO the describe error will be in anError (use of ref)
@return aBoolean for the success or fail of the method
*/
- (BOOL)getObjectValue:(id)anObject forString:(CPString)aString errorDescription:(CPString)anError
- (BOOL)getObjectValue:(idRef)anObject forString:(CPString)aString errorDescription:(CPStringRef)anError
{
var value = [self dateFromString:aString];
@deref(anObject) = value;
+14 -1
View File
@@ -130,7 +130,20 @@ var CPDefaultDcmHandler = nil;
@end
// CPDecimalNumberBehaviors protocol
@implementation CPDecimalNumberHandler (CPDecimalNumberBehaviors)
@protocol CPDecimalNumberBehaviors
- (CPRoundingMode)roundingMode;
- (short)scale;
// The scale could return NO_SCALE for no defined scale.
- (CPDecimalNumber)exceptionDuringOperation:(SEL)operation error:(CPCalculationError)error leftOperand:(CPDecimalNumber)leftOperand rightOperand:(CPDecimalNumber)rightOperand;
// Receiver can raise, return a new value, or return nil to ignore the exception.
@end
@implementation CPDecimalNumberHandler (CPDecimalNumberBehaviors) <CPDecimalNumberBehaviors>
/*!
Returns the current rounding mode. One of \e CPRoundingMode enum:
+1 -1
View File
@@ -91,7 +91,7 @@ CPFilePathErrorKey = @"CPFilePathErrorKey";
return [_userInfo objectForKey:CPRecoveryAttempterErrorKey];
}
- (id)description
- (CPString)description
{
return [CPString stringWithFormat:@"Error Domain=%@ Code=%d UserInfo=%p %@", _domain, _code, _userInfo, [self localizedDescription]];
}
+1 -1
View File
@@ -1187,5 +1187,5 @@ X - (void)addIndex:(unsigned int)value;
X - (void)removeIndex:(unsigned int)value;
X - (void)addIndexesInRange:(NSRange)range;
X - (void)removeIndexesInRange:(NSRange)range;
- (void)shiftIndexesStartingAtIndex:(unsigned int)index by:(int)delta;
- (void)shiftIndexesStartingAtIndex:(CPUInteger)index by:(int)delta;
*/
+2 -2
View File
@@ -105,7 +105,7 @@
@param anArgument the argument to add
@param anIndex the index of the argument in the method
*/
- (void)setArgument:(id)anArgument atIndex:(unsigned)anIndex
- (void)setArgument:(id)anArgument atIndex:(CPUInteger)anIndex
{
_arguments[anIndex] = anArgument;
}
@@ -116,7 +116,7 @@
@param anIndex the index of the argument to return
@throws CPInvalidArgumentException if anIndex is greater than or equal to the invocation's number of arguments.
*/
- (id)argumentAtIndex:(unsigned)anIndex
- (id)argumentAtIndex:(CPUInteger)anIndex
{
return _arguments[anIndex];
}
+2 -2
View File
@@ -135,7 +135,7 @@
}
}
- (void)addObserver:(id)anObserver forKeyPath:(CPString)aPath options:(unsigned)options context:(id)aContext
- (void)addObserver:(id)anObserver forKeyPath:(CPString)aPath options:(CPKeyValueObservingOptions)options context:(id)aContext
{
if (!anObserver || !aPath)
return;
@@ -742,7 +742,7 @@ var kvoNewAndOld = CPKeyValueObservingOptionNew | CPKeyValueObservingOpti
}
}
- (void)_addObserver:(id)anObserver forKeyPath:(CPString)aPath options:(unsigned)options context:(id)aContext
- (void)_addObserver:(id)anObserver forKeyPath:(CPString)aPath options:(CPKeyValueObservingOptions)options context:(id)aContext
{
if (!anObserver)
return;
+1 -1
View File
@@ -189,7 +189,7 @@ var NumberRegex = new RegExp('(-)?(\\d*)(\\.(\\d*))?');
return [self stringForObjectValue:anObject];
}
- (BOOL)getObjectValue:(id)anObjectRef forString:(CPString)aString errorDescription:(CPString)anErrorRef
- (BOOL)getObjectValue:(idRef)anObjectRef forString:(CPString)aString errorDescription:(CPStringRef)anErrorRef
{
// Interpret an empty string as nil, like in Cocoa.
if (aString === @"")
+1 -1
View File
@@ -329,7 +329,7 @@
/* = Debug = */
/* ========= */
- (void)description
- (CPString)description
{
return [super description] + " {" + CPStringFromClass([self class]) + ", state = '" + ([self string].substr(0, _scanLocation) + "{{ SCAN LOCATION ->}}" + [self string].substr(_scanLocation)) + "'; }";
}
+1 -1
View File
@@ -168,7 +168,7 @@
[_proxyObject setValue:anObject forKey:_key];
}
- (unsigned)count
- (CPUInteger)count
{
if (_count)
return _count(_proxyObject, _countSEL);
+3 -3
View File
@@ -206,7 +206,7 @@ var CPStringUIDs = new CFMutableDictionary(),
Returns the character at the specified index.
@param anIndex the index of the desired character
*/
- (CPString)characterAtIndex:(unsigned)anIndex
- (CPString)characterAtIndex:(CPUInteger)anIndex
{
return self.charAt(anIndex);
}
@@ -249,7 +249,7 @@ var CPStringUIDs = new CFMutableDictionary(),
@param anIndex the index of the padding string to start from (if necessary to use)
@return the new padded string
*/
- (CPString)stringByPaddingToLength:(unsigned)aLength withString:(CPString)aString startingAtIndex:(unsigned)anIndex
- (CPString)stringByPaddingToLength:(unsigned)aLength withString:(CPString)aString startingAtIndex:(CPUInteger)anIndex
{
if (self.length == aLength)
return self;
@@ -596,7 +596,7 @@ var CPStringNull = [CPNull null];
/*!
Returns a hash of the string instance.
*/
- (unsigned)UID
- (CPString)UID
{
var UID = CPStringUIDs.valueForKey(self);
+4 -4
View File
@@ -1079,22 +1079,22 @@
return [_contentArray count];
}
- (id)objectInItemsArrayAtIndex:(unsigned int)index
- (id)objectInItemsArrayAtIndex:(CPUInteger)index
{
return [_contentArray objectAtIndex:index];
}
- (void)insertObject:(id)anObject inItemsArrayAtIndex:(unsigned int)index
- (void)insertObject:(id)anObject inItemsArrayAtIndex:(CPUInteger)index
{
[_contentArray insertObject:anObject atIndex:index];
}
- (void)removeObjectFromItemsArrayAtIndex:(unsigned int)index
- (void)removeObjectFromItemsArrayAtIndex:(CPUInteger)index
{
[_contentArray removeObjectAtIndex:index];
}
- (void)replaceObjectInItemsArrayAtIndex:(unsigned int)index withObject:(id)anObject
- (void)replaceObjectInItemsArrayAtIndex:(CPUInteger)index withObject:(id)anObject
{
[_contentArray replaceObjectAtIndex:index withObject:anObject];
}
+3 -3
View File
@@ -116,7 +116,7 @@ var sharedObject = [CPObject new];
testAttributesAtIndexWithValues(string, 33, expectedValues, self);
}
//- (CPDictionary)attributesAtIndex:(unsigned)anIndex longestEffectiveRange:(CPRangePointer)aRange inRange:(CPRange)rangeLimit
//- (CPDictionary)attributesAtIndex:(CPUInteger)anIndex longestEffectiveRange:(CPRangePointer)aRange inRange:(CPRange)rangeLimit
- (void)testAttributesAtIndexLongestEffectiveRangeInRange
{
var string = [self stringForTesting];
@@ -135,7 +135,7 @@ var sharedObject = [CPObject new];
[self assertTrue:[attributes objectForKey:"f"] === 43 message:@"expecting 'f' to be 43, was: " + [attributes objectForKey:"f"]];
}
//- (id)attribute:(CPString)attribute atIndex:(unsigned)index effectiveRange:(CPRangePointer)aRange
//- (id)attribute:(CPString)attribute atIndex:(CPUInteger)index effectiveRange:(CPRangePointer)aRange
- (void)testAttributeAtIndexEffectiveRange
{
var string = [self stringForTesting];
@@ -144,7 +144,7 @@ var sharedObject = [CPObject new];
testAttributeAtIndexWithValue(string, 20, "d", [CPNull null], self);
}
//- (id)attribute:(CPString)attribute atIndex:(unsigned)index longestEffectiveRange:(CPRangePointer)aRange inRange:(CPRange)rangeLimit
//- (id)attribute:(CPString)attribute atIndex:(CPUInteger)index longestEffectiveRange:(CPRangePointer)aRange inRange:(CPRange)rangeLimit
- (void)testAttributeAtIndexLongestEffectiveRangeInRange
{
var string = [self stringForTesting];
+3 -3
View File
@@ -833,17 +833,17 @@
return [managedObjects count];
}
- (id)objectInManagedObjectsAtIndex:(unsigned)anIndex
- (id)objectInManagedObjectsAtIndex:(CPUInteger)anIndex
{
return [managedObjects objectAtIndex:anIndex];
}
- (void)removeObjectFromManagedObjectsAtIndex:(unsigned)anIndex
- (void)removeObjectFromManagedObjectsAtIndex:(CPUInteger)anIndex
{
[managedObjects removeObjectAtIndex:anIndex];
}
- (void)insertObject:(id)anObject inManagedObjectsAtIndex:(unsigned)anIndex
- (void)insertObject:(id)anObject inManagedObjectsAtIndex:(CPUInteger)anIndex
{
[managedObjects insertObject:anObject atIndex:anIndex];
}
@@ -134,22 +134,22 @@ CPLogRegister(CPLogConsole);
return [itemsArray count];
}
- (id)objectInItemsArrayAtIndex:(unsigned int)index
- (id)objectInItemsArrayAtIndex:(CPUInteger)index
{
return [itemsArray objectAtIndex:index];
}
- (void)insertObject:(id)anObject inItemsArrayAtIndex:(unsigned int)index
- (void)insertObject:(id)anObject inItemsArrayAtIndex:(CPUInteger)index
{
[itemsArray insertObject:anObject atIndex:index];
}
- (void)removeObjectFromItemsArrayAtIndex:(unsigned int)index
- (void)removeObjectFromItemsArrayAtIndex:(CPUInteger)index
{
[itemsArray removeObjectAtIndex:index];
}
- (void)replaceObjectInItemsArrayAtIndex:(unsigned int)index withObject:(id)anObject
- (void)replaceObjectInItemsArrayAtIndex:(CPUInteger)index withObject:(id)anObject
{
[itemsArray replaceObjectAtIndex:index withObject:anObject];
}
+1 -1
View File
@@ -51,7 +51,7 @@ var _CPCibCustomViewClassNameKey = @"_CPCibCustomViewClassNameKey";
[aCoder encodeObject:CP_NSMapClassName(_className) forKey:_CPCibCustomViewClassNameKey];
}
- (CPString)classForKeyedArchiver
- (Class)classForKeyedArchiver
{
return [_CPCibCustomView class];
}