This is KeyDownMatrix.m in view mode; [Download] [Up]
//---------------------------------------------------------------------------------------------------------
//
// KeyDownMatrix
//
// Inherits From: Matrix
//
// Declared In: KeyDownMatrix.h
//
// Disclaimer
//
// You may freely copy, distribute and reuse this software and its
// associated documentation. I disclaim any warranty of any kind,
// expressed or implied, as to its fitness for any particular use.
//
//---------------------------------------------------------------------------------------------------------
#import "KeyDownMatrix.h"
@implementation KeyDownMatrix
- mouseDown: (NXEvent*) theEvent
{
// Override to make KeyDownBrowser first responder (ascend view hierarchy -
// Matrix, ClipView, ScrollView, KeyDownBrowser). Making any of the subviews
// first responder would work, as the responder chain would eventually hit browser.
// Specifying the browser eliminates the unnecessary search.
if ([self isEnabled] == NO) return self;
[super mouseDown: theEvent];
[[self window] makeFirstResponder: [[superview superview] superview]];
return self;
}
- (int) numRows
{
return numRows;
}
- (int) numCols
{
return numCols;
}
@endThese are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.