mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
Added exceptions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3977 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bc4841ed81
commit
2682063fed
2 changed files with 20 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Mar 25 09:12:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
Source/NSCell.m: Added all the exceptions mentioned in the docs.
|
||||
|
||||
Wed Mar 24 10:52:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSMenu.m: ([-acceptsFirstmouse:]) implemented.
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSValue.h>
|
||||
|
||||
#include <AppKit/AppKitExceptions.h>
|
||||
#include <AppKit/NSApplication.h>
|
||||
#include <AppKit/NSWindow.h>
|
||||
#include <AppKit/NSImage.h>
|
||||
|
@ -694,6 +695,8 @@
|
|||
|
||||
- (void) setAction: (SEL)aSelector
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"attempt to set an action in an NSCell"];
|
||||
}
|
||||
|
||||
- (BOOL) isContinuous
|
||||
|
@ -718,6 +721,8 @@
|
|||
|
||||
- (void) setTarget: (id)anObject
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"attempt to set a target in an NSCell"];
|
||||
}
|
||||
|
||||
- (id) target
|
||||
|
@ -751,6 +756,8 @@
|
|||
//
|
||||
- (void) setTag: (int)anInt
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"attempt to set a tag in an NSCell"];
|
||||
}
|
||||
|
||||
- (int) tag
|
||||
|
@ -763,7 +770,7 @@
|
|||
//
|
||||
- (NSString*) keyEquivalent
|
||||
{
|
||||
return nil;
|
||||
return @"";
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -943,7 +950,14 @@
|
|||
//
|
||||
- (NSComparisonResult) compare: (id)otherCell
|
||||
{
|
||||
return 0;
|
||||
if ([otherCell isKindOfClass: [NSCell class]] == NO)
|
||||
[NSException raise: NSBadComparisonException
|
||||
format: @"NSCell comparison with non-NSCell"];
|
||||
if (cell_type != NSTextCellType
|
||||
|| ((NSCell*)otherCell)->cell_type != NSTextCellType)
|
||||
[NSException raise: NSBadComparisonException
|
||||
format: @"Comparison between non-text cells"];
|
||||
return [contents compare: ((NSCell*)otherCell)->contents];
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue