diff --git a/PCLib/PCBrowserController.m b/PCLib/PCBrowserController.m index 6bbc578..dfc85c2 100644 --- a/PCLib/PCBrowserController.m +++ b/PCLib/PCBrowserController.m @@ -41,15 +41,32 @@ NSTextView *pTextView; if ([[sender selectedCell] isLeaf]) { + NSString *ltitle = [[sender selectedCell] stringValue]; NSString *ctitle = [[sender selectedCellInColumn:0] stringValue]; - NSString *text = [NSString stringWithFormat:@"Display File %@",[[sender selectedCell] stringValue] -]; + NSString *ctitlef = [[project projectPath] stringByAppendingPathComponent:ltitle]; + pTextView = [project textView]; + NSLog(@"****** %@",ctitlef); + if ([ctitle isEqualToString:@"Classes"]) { - [pTextView setString:text]; + NSString *f = [NSString stringWithContentsOfFile:ctitlef]; + + [pTextView setString:f]; + } + else if ([ctitle isEqualToString:@"Headers"]) { + NSString *f = [NSString stringWithContentsOfFile:ctitlef]; + + [pTextView setString:f]; + } + else if ([ctitle isEqualToString:@"Other Sources"]) { + NSString *f = [NSString stringWithContentsOfFile:ctitlef]; + + [pTextView setString:f]; } + // This should not be needed! + [pTextView display]; } } diff --git a/PCLib/PCFileManager.h b/PCLib/PCFileManager.h index 08f61b0..feb164c 100644 --- a/PCLib/PCFileManager.h +++ b/PCLib/PCFileManager.h @@ -88,3 +88,6 @@ - (void)fileManager:(id)sender didAddFile:(NSString *)file forKey:(NSString *)key; @end + + +