Diffstat (limited to 'pumpkin/XFersViewDatasource.m') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pumpkin/XFersViewDatasource.m | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pumpkin/XFersViewDatasource.m b/pumpkin/XFersViewDatasource.m new file mode 100644 index 0000000..1f7c689 --- a/dev/null +++ b/pumpkin/XFersViewDatasource.m | |||
@@ -0,0 +1,24 @@ | |||
1 | |||
2 | #import "XFersViewDatasource.h" | ||
3 | #import "XFer.h" | ||
4 | |||
5 | @implementation XFersViewDatasource | ||
6 | |||
7 | - (id)initWithXfers:(NSMutableArray*)x { | ||
8 | if(!(self = [super init])) return self; | ||
9 | xfers = [x retain]; | ||
10 | return self; | ||
11 | } | ||
12 | - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { | ||
13 | return [xfers[rowIndex] cellValueForColumn:aTableColumn.identifier]; | ||
14 | } | ||
15 | - (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView { | ||
16 | return xfers.count; | ||
17 | } | ||
18 | |||
19 | - (void) dealloc { | ||
20 | [xfers release]; | ||
21 | [super dealloc]; | ||
22 | } | ||
23 | |||
24 | @end | ||