Here's my code of generating data
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
[array initWithCapacity:20];
}
- (IBAction) readlog:(id)sender {
for (int i = 0; i < 20; i++) {
NSDictionary *d = [NSDictionary dictionaryWithContentsOfFile:[path stringByAppendingFormat:@"/%d.log",i]];
[array addObject:d];
}
}
- (IBAction) writelog:(id)sender {
for (int i = 0; i < 20; i++) {
NSMutableDictionary *d = [NSMutableDictionary dictionary];
NSString *name = [NSString stringWithFormat:@"testfile%d", i];
[d setObject:[NSDate date] forKey:@"date"];
[d setObject:[path stringByAppendingFormat:@"/%d.log", i] forKey:@"path"];
[d setObject:name forKey:@"name"];
[d writeToFile:[path stringByAppendingFormat:@"/%d.log", i] atomically:YES];
}
and I bind my tableview column with appdelegate.array with keypath name/path/date but it doesn't show any data in the array.. is there anything wrong here? Thanks!