-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrProfil_DS.m
111 lines (80 loc) · 2.16 KB
/
rProfil_DS.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//
// rAVR_DS.m
// USBInterface
//
// Created by Sysadmin on 13.02.08.
// Copyright 2008 Ruedi Heimlicher. All rights reserved.
//
#import "rProfil_DS.h"
@implementation rProfil_DS
- (id)init
{
ProfilTabelle=[[NSMutableArray alloc]initWithCapacity:0];
[ProfilTabelle retain];
return self;
}
- (NSArray*)ProfilTabelle
{
return ProfilTabelle;
}
- (void)setProfilTabelle:(NSArray*)dieProfilTabelle
{
//NSLog(@"rProfil_DS setProfilPlan: %@",[derProfilPlan description]);
int anzReports=[dieProfilTabelle count];
int i;
for (i=0;i<anzReports;i++)
{
//NSMutableDictionary* tempTagDic=[[[NSMutableDictionary alloc]initWithCapacity:0]autorelease];
// [tempTagDic setObject:[NSNumber numberWithInt:3] forKey:@"drei"];
// [ProfilTabelle addObject:tempTagDic];
}
[ProfilTabelle setArray:dieProfilTabelle];
}
- (void)clearProfilTabelle
{
[ProfilTabelle removeAllObjects];
}
- (void)addTagplan:(NSArray*)derTagplan
{
//NSLog(@"AVR_DS setProfilPlan");
int anz=[derTagplan count];
int i,k;
k=0;
for (i=0;i<anz;i++)
{
NSMutableDictionary* tempTagDic=[[[NSMutableDictionary alloc]initWithCapacity:0]autorelease];
[tempTagDic setObject:[NSNumber numberWithInt:i] forKey:@"stunde"];
[ProfilTabelle addObject:tempTagDic];
}
}
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
{
return [ProfilTabelle count];
}
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex
{
//NSLog(@"objectValueForTableColumn");
NSDictionary *einTestDic;
if (rowIndex<[ProfilTabelle count])
{
einTestDic = [ProfilTabelle objectAtIndex: rowIndex];
}
//NSLog(@"einTestDic Testname: %@",[einTestDic objectForKey:@"name"]);
return [einTestDic objectForKey:[aTableColumn identifier]];
}
- (void)tableView:(NSTableView *)aTableView
setObjectValue:(id)anObject
forTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex
{
//NSLog(@"setObjectValue ForTableColumn");
NSMutableDictionary* einTestDic;
if (rowIndex<[ProfilTabelle count])
{
einTestDic=[ProfilTabelle objectAtIndex:rowIndex];
[einTestDic setObject:anObject forKey:[aTableColumn identifier]];
}
}
@end