PageRenderTime 40ms CodeModel.GetById 24ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/google-toolbox-for-mac/AppKit/GTMDelegatingTableColumn.m

http://macfuse.googlecode.com/
Objective C | 42 lines | 22 code | 3 blank | 17 comment | 4 complexity | 4df21f9e1f13b41b68eb97827318968c MD5 | raw file
 1//
 2//  GTMDelegatingTableColumn.m
 3//
 4//  Copyright 2006-2008 Google Inc.
 5//
 6//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
 7//  use this file except in compliance with the License.  You may obtain a copy
 8//  of the License at
 9// 
10//  http://www.apache.org/licenses/LICENSE-2.0
11// 
12//  Unless required by applicable law or agreed to in writing, software
13//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
15//  License for the specific language governing permissions and limitations under
16//  the License.
17//
18
19#import "GTMDelegatingTableColumn.h"
20
21@implementation GTMDelegatingTableColumn
22- (id)dataCellForRow:(NSInteger)row {
23  id dataCell = nil;
24  id delegate = [[self tableView] delegate];
25  BOOL sendSuper = YES;
26  if (delegate) {
27    if ([delegate respondsToSelector:@selector(gtm_tableView:dataCellForTableColumn:row:)]) {
28
29      dataCell = [delegate gtm_tableView:[self tableView]
30                    dataCellForTableColumn:self
31                                        row:row];
32      sendSuper = NO;
33    } else {
34      _GTMDevLog(@"tableView delegate didn't implement gtm_tableView:dataCellForTableColumn:row:");
35    }
36  }
37  if (sendSuper) {
38    dataCell = [super dataCellForRow:row];
39  }
40  return dataCell;
41}
42@end