diff --git a/ChangeLog b/ChangeLog index 3bd4fbbc9..ad00efa65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,10 @@ Tue Jan 19 10:00:00 1999 Richard Frith-Macdonald * Source/NSBrowser.m: ([-selectedRowInColumn:]) implemented as suggested by Dirk Olmes. * Headers/AppKit/NSBrowser.h: ditto + * Source/NSView.m: Raise exception if supplied with illegal + bounds size (reported by Benhur-de-Oliveira.Stein@imag.fr) + * Source/NSControl.m: Corrected ([-sendActionon:]) as + suggested by Benhur-de-Oliveira.Stein@imag.fr Mon Jan 18 5:00:00 1999 Richard Frith-Macdonald diff --git a/Source/NSControl.m b/Source/NSControl.m index 29c23f127..5a862d47d 100644 --- a/Source/NSControl.m +++ b/Source/NSControl.m @@ -312,7 +312,11 @@ NSApplication *theApp = [NSApplication sharedApplication]; return NO; } -- (int)sendActionOn:(int)mask { return 0; } +- (int) sendActionOn: (int)mask +{ + return [cell sendActionOn: mask]; +} + - (void)setAction:(SEL)aSelector { [cell setAction:aSelector]; } - (void)setContinuous:(BOOL)flag { [cell setContinuous:flag]; } - (void)setTarget:(id)anObject { [cell setTarget:anObject]; } diff --git a/Source/NSView.m b/Source/NSView.m index 2fe113216..1a8677bad 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -376,6 +376,9 @@ NSSize old_size = frame.size; { float sx, sy; + if (aRect.size.width <= 0 || aRect.size.height <= 0) + [NSException raise: NSInvalidArgumentException + format: @"illegal bounds size supplied"]; bounds = aRect; [boundsMatrix setFrameOrigin: NSMakePoint(-bounds.origin.x, -bounds.origin.y)]; @@ -408,6 +411,9 @@ float sx, sy; { float sx, sy; + if (newSize.width <= 0 || newSize.height <= 0) + [NSException raise: NSInvalidArgumentException + format: @"illegal bounds size supplied"]; bounds.size = newSize; sx = frame.size.width / bounds.size.width; sy = frame.size.height / bounds.size.height;