diff --git a/AppKit/CPBox.j b/AppKit/CPBox.j index 2a0f45ff2..05500b550 100644 --- a/AppKit/CPBox.j +++ b/AppKit/CPBox.j @@ -58,7 +58,9 @@ CPGrooveBorder = 3; - (id)initWithFrame:(CPRect)frameRect { - if (self = [super initWithFrame:frameRect]) + self = [super initWithFrame:frameRect]; + + if (self) { _fillColor = [CPColor clearColor]; _borderColor = [CPColor blackColor]; diff --git a/AppKit/CPImage.j b/AppKit/CPImage.j index e42bf35b1..bd9e746fa 100644 --- a/AppKit/CPImage.j +++ b/AppKit/CPImage.j @@ -90,6 +90,11 @@ function CPImageInBundle(aFilename, aSize, aBundle) Image _image; } +- (id)init +{ + return [self initByReferencingFile:@"" size:CGSizeMake(-1, -1)]; +} + /*! Initializes the image, by associating it with a filename. The image denoted in \c aFilename is not actually loaded. It will @@ -98,7 +103,7 @@ function CPImageInBundle(aFilename, aSize, aBundle) @param aSize the image's size @return the initialized image */ -- (CPImage)initByReferencingFile:(CPString)aFilename size:(CGSize)aSize +- (id)initByReferencingFile:(CPString)aFilename size:(CGSize)aSize { self = [super init]; @@ -118,7 +123,7 @@ function CPImageInBundle(aFilename, aSize, aBundle) @param aSize the size of the image @return the initialized image. */ -- (CPImage)initWithContentsOfFile:(CPString)aFilename size:(CGSize)aSize +- (id)initWithContentsOfFile:(CPString)aFilename size:(CGSize)aSize { self = [self initByReferencingFile:aFilename size:aSize]; @@ -134,9 +139,9 @@ function CPImageInBundle(aFilename, aSize, aBundle) @param aFilename the file name of the image @return the initialized image */ -- (CPImage)initWithContentsOfFile:(CPString)aFilename +- (id)initWithContentsOfFile:(CPString)aFilename { - self = [self initByReferencingFile:aFilename size: CGSizeMake(-1, -1)]; + self = [self initByReferencingFile:aFilename size:CGSizeMake(-1, -1)]; if (self) [self load]; diff --git a/AppKit/CPMenuItem.j b/AppKit/CPMenuItem.j index b738729ed..2a35aceb2 100644 --- a/AppKit/CPMenuItem.j +++ b/AppKit/CPMenuItem.j @@ -78,6 +78,11 @@ _CPMenuItemView _menuItemView; } +- (id)init +{ + return [self initWithTitle:@"" action:nil keyEquivalent:nil]; +} + /*! Initializes the menu item with a title, action, and keyboard equivalent. @param aTitle the menu item's title diff --git a/AppKit/CPTabViewItem.j b/AppKit/CPTabViewItem.j index 0ebc4a5e0..356f4f1af 100644 --- a/AppKit/CPTabViewItem.j +++ b/AppKit/CPTabViewItem.j @@ -60,6 +60,11 @@ CPPressedTab = 2; CPView _auxiliaryView; } +- (id)init +{ + return [self initWithIdentifier:@""]; +} + /*! Initializes the tab view item with the specified identifier. @return the initialized CPTabViewItem diff --git a/AppKit/CPTableColumn.j b/AppKit/CPTableColumn.j index aaf50090b..9653af630 100644 --- a/AppKit/CPTableColumn.j +++ b/AppKit/CPTableColumn.j @@ -62,6 +62,11 @@ CPTableColumnUserResizingMask = 2; CPString _headerToolTip; } +- (id)init +{ + return [self initWithIdentifier:@""]; +} + - (id)initWithIdentifier:(id)anIdentifier { self = [super init]; diff --git a/AppKit/CPToolbar.j b/AppKit/CPToolbar.j index 6bcff4a60..8f019a2f8 100644 --- a/AppKit/CPToolbar.j +++ b/AppKit/CPToolbar.j @@ -128,6 +128,11 @@ var CPToolbarConfigurationsByIdentifier = nil; [toolbarsSharingIdentifier addObject:toolbar]; } +- (id)init +{ + return [self initWithIdentifier:@""]; +} + /*! Initializes the toolbar with the specified identifier. @param anIdentifier the identifier for the toolbar diff --git a/AppKit/CPToolbarItem.j b/AppKit/CPToolbarItem.j index 64c4aea7c..7c1ac52bc 100644 --- a/AppKit/CPToolbarItem.j +++ b/AppKit/CPToolbarItem.j @@ -86,6 +86,11 @@ CPToolbarPrintItemIdentifier = @"CPToolbarPrintItemIdentifier"; int _visibilityPriority; } +- (id)init +{ + return [self initWithItemIdentifier:@""]; +} + // Creating a Toolbar Item /*! Initializes the toolbar item with a specified identifier.