Created
October 4, 2009 20:09
-
-
Save hammerdr/201610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import <AppKit/CPView.j> | |
@implementation OLResourceView : CPView | |
{ | |
} | |
- (id)initWithFrame:(CGRect)frame | |
{ | |
if(self = [super initWithFrame:frame]) | |
{ | |
var filterView = [[CPScrollView alloc] initWithFrame:CGRectMake(20,20,CGRectGetWidth(frame)/4-40, 200)]; | |
var filterTableView = [[CPTableView alloc] initWithFrame:CGRectMake(0,0,CGRectGetWidth([filterView bounds]), 200)]; | |
var filterTableColumn = [[CPTableColumn alloc] initWithIdentifier:@"filterColumn"]; | |
[filterTableColumn setWidth: CGRectGetWidth([filterTableView bounds])]; | |
[filterTableView addTableColumn: filterTableColumn]; | |
[filterTableView setUsesAlternatingRowBackgroundColors:YES]; | |
[filterView setDocumentView:filterTableView]; | |
[filterTableView setDataSource:self]; | |
[self addSubview:filterView]; | |
} | |
return self; | |
} | |
- (int)numberOfRowsInTableView:(CPTableView)view | |
{ | |
return 50; | |
} | |
- (id)tableView:(CPTableView)view objectValueForTableColumn:(CPTableColumn)column row:(int)row | |
{ | |
return "Bob"; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment