home *** CD-ROM | disk | FTP | other *** search
- /*
- You may freely copy, distribute, and reuse the code in this example.
- NeXT disclaims any warranty of any kind, expressed or implied, as to its
- fitness for any particular use.
- */
-
- #import "SelectionNotifMatrix.h"
-
- NSString *SelectionInMatrixNotification = @"SelectionInMatrixNotification";
-
- @implementation SelectionNotifMatrix
-
- - (void)mouseDown:(NSEvent *)theEvent
- {
- int row;
- [super mouseDown:theEvent];
-
- row = [self selectedRow];
- if (row != -1) {
- [[NSNotificationCenter defaultCenter]
- postNotificationName:SelectionInMatrixNotification
- object:self
- userInfo:[NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithInt:row], @"ItemIndex", nil]];
- }
- }
-
-
- @end
-