Fixes to improve compliance

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5077 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 1999-10-25 22:12:27 +00:00
parent eda939c97c
commit 9737128f0b

View file

@ -296,11 +296,16 @@ static Class cellClass;
- (void) setImage: (NSImage*)anImage
{
NSAssert(anImage == nil || [anImage isKindOfClass: imageClass],
NSInvalidArgumentException);
if (anImage)
{
NSAssert ([anImage isKindOfClass: imageClass],
NSInvalidArgumentException);
}
if (cell_type != NSImageCellType)
[self setType: NSImageCellType];
ASSIGN(cell_image, anImage);
[self setType: NSImageCellType];
}
/*
@ -351,6 +356,9 @@ static Class cellClass;
{
NSString* _string;
if (cell_type != NSTextCellType)
[self setType: NSTextCellType];
if (!aString)
_string = @"";
else