Simple Display of relevant Data now working

This commit is contained in:
michael starke
2013-02-19 22:43:04 +01:00
parent 7ea34a2300
commit 7ea037cdc3
10 changed files with 203 additions and 55 deletions

View File

@@ -10,9 +10,17 @@
#import "MPIconHelper.h"
#import "KdbLib.h"
NSString *const MPOutlineViewDidChangeGroupSelection = @"MPOutlineViewDidChangeGroupSelection";
NSString *const _MPOutlineViewDataViewIdentifier = @"DataCell";
NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
@interface MPOutlineViewDelegate ()
@property (assign) KdbGroup *selectedGroup;
@end
@implementation MPOutlineViewDelegate
- (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item {
@@ -47,4 +55,12 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
return (nil != [group parent]);
}
- (void)outlineViewSelectionDidChange:(NSNotification *)notification {
NSOutlineView *outlineView = [notification object];
KdbGroup *selectedGroup = [outlineView itemAtRow:[outlineView selectedRow]];
self.selectedGroup = selectedGroup;
NSLog(@"Selected: %@", self.selectedGroup);
[[NSNotificationCenter defaultCenter] postNotificationName:MPOutlineViewDidChangeGroupSelection object:self userInfo:nil];
}
@end