Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /XspfManager/XspfMTableView.m

Parent Directory Parent Directory | Revision Log Revision Log


Revision 70 - (hide annotations) (download)
Sun Nov 15 01:20:39 2009 UTC (14 years, 5 months ago) by masaki
File size: 615 byte(s)
[New] エンターで開けるようにNSTableViewをサブクラス化。
1 masaki 70 //
2     // XspfMTableView.m
3     // XspfManager
4     //
5     // Created by Hori,Masaki on 09/11/15.
6     // Copyright 2009 masakih. All rights reserved.
7     //
8    
9     #import "XspfMTableView.h"
10    
11    
12     @implementation XspfMTableView
13     - (void)keyDown:(NSEvent *)theEvent
14     {
15     if([theEvent isARepeat]) return [super keyDown:theEvent];
16    
17     #define kRETURN_KEY 36
18     #define kENTER_KEY 52
19    
20     unsigned short code = [theEvent keyCode];
21     // NSLog(@"code -> %d", code);
22     switch(code) {
23     case kRETURN_KEY:
24     case kENTER_KEY:
25     if([self action]) {
26     [self sendAction:[self action] to:[self target]];
27     return;
28     }
29     break;
30     }
31    
32     [super keyDown:theEvent];
33     }
34     @end

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26