comparison mac/dw.m @ 743:4462bc7de1e3

Possible fix for container (and possibly tree) controls picking up combobox events.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 16 Mar 2011 02:56:18 +0000
parents 1d80d728a773
children 9882b0dfa304
comparison
equal deleted inserted replaced
742:1d80d728a773 743:4462bc7de1e3
1066 { 1066 {
1067 tvcols = [[[NSMutableArray alloc] init] retain]; 1067 tvcols = [[[NSMutableArray alloc] init] retain];
1068 data = [[[NSMutableArray alloc] init] retain]; 1068 data = [[[NSMutableArray alloc] init] retain];
1069 types = [[[NSMutableArray alloc] init] retain]; 1069 types = [[[NSMutableArray alloc] init] retain];
1070 titles = [[NSPointerArray pointerArrayWithWeakObjects] retain]; 1070 titles = [[NSPointerArray pointerArrayWithWeakObjects] retain];
1071 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(selectionChanged:) name:NSTableViewSelectionDidChangeNotification object:[self window]]; 1071 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(selectionChanged:) name:NSTableViewSelectionDidChangeNotification object:self];
1072 } 1072 }
1073 -(void)doubleClicked:(id)sender 1073 -(void)doubleClicked:(id)sender
1074 { 1074 {
1075 /* Handler for container class */ 1075 /* Handler for container class */
1076 _event_handler(self, (NSEvent *)[self getRowTitle:(int)[self selectedRow]], 9); 1076 _event_handler(self, (NSEvent *)[self getRowTitle:(int)[self selectedRow]], 9);
1170 [imagecol setWidth:20]; 1170 [imagecol setWidth:20];
1171 [self addTableColumn:imagecol]; 1171 [self addTableColumn:imagecol];
1172 textcol = [[NSTableColumn alloc] init]; 1172 textcol = [[NSTableColumn alloc] init];
1173 [self addTableColumn:textcol]; 1173 [self addTableColumn:textcol];
1174 [self setOutlineTableColumn:textcol]; 1174 [self setOutlineTableColumn:textcol];
1175 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(treeSelectionChanged:) name:NSOutlineViewSelectionDidChangeNotification object:[self window]]; 1175 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(treeSelectionChanged:) name:NSOutlineViewSelectionDidChangeNotification object:self];
1176 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(treeItemExpanded:) name:NSOutlineViewItemDidExpandNotification object:[self window]]; 1176 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(treeItemExpanded:) name:NSOutlineViewItemDidExpandNotification object:self];
1177 } 1177 }
1178 return self; 1178 return self;
1179 } 1179 }
1180 -(id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item 1180 -(id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item
1181 { 1181 {