@@ -14,11 +14,6 @@ @interface SSYArrayController ()
14
14
@end
15
15
16
16
17
- @interface SSYArrayController ()
18
-
19
- @property (assign ) BOOL hasSelection ;
20
-
21
- @end
22
17
23
18
@implementation SSYArrayController
24
19
@@ -28,12 +23,8 @@ @implementation SSYArrayController
28
23
@synthesize pendingObjectsIndexSet = m_pendingObjectsIndexSet ;
29
24
@synthesize lineHeightMultiplier = m_lineHeightMultiplier ;
30
25
@synthesize tableFontSize = m_tableFontSize ;
31
- @synthesize hasSelection = m_hasSelection ;
32
26
33
- - (void )dealloc {
34
- [self removeObserver: self
35
- forKeyPath: @" selectedObjects" ] ;
36
-
27
+ - (void )dealloc {
37
28
[m_parentObjectKey release ] ;
38
29
[m_contentKey release ] ;
39
30
[m_pendingObjectsIndexSet release ] ;
@@ -55,52 +46,8 @@ - (void)awakeFromNib {
55
46
nil ] ;
56
47
[tableView registerForDraggedTypes: draggedTypes] ;
57
48
[tableView setAllowsMultipleSelection: YES ] ;
58
-
59
- [self addObserver: self
60
- forKeyPath: @" selectedObjects"
61
- options: 0
62
- context: NULL ] ;
63
49
}
64
50
65
- - (void )observeValueForKeyPath : (NSString *)keyPath
66
- ofObject : (id )object
67
- change : (NSDictionary *)change
68
- context : (void *)context {
69
- if ([keyPath isEqualToString: @" selectedObjects" ]) {
70
- #if 0
71
- #warning observing changes to selected objects for Mythical Deep Observer
72
- NSLog(@"1681: Some sleazeball changed selection: %@", [change shortDescription]) ;
73
- NSLog(@"continuing") ;
74
- #endif
75
- NSInteger selectionCount = [[self selectedObjects ] count ] ;
76
- [self setHasSelection: (selectionCount > 0 )] ;
77
- }
78
-
79
- // NSTimeInterval startTime = [NSDate timeIntervalSinceReferenceDate] ;
80
-
81
- [super observeValueForKeyPath: keyPath
82
- ofObject: object
83
- change: change
84
- context: context] ;
85
-
86
- /*
87
- NSTimeInterval thisTime = [NSDate timeIntervalSinceReferenceDate] - startTime ;
88
- if ([object isKindOfClass:[Starkoid class]]) {
89
- starkoidTime += thisTime ;
90
- NSLog(@"starkoidTime = %0.3f", starkoidTime) ;
91
- }
92
- else if ([object isKindOfClass:[SSYArrayController class]]) {
93
- arrayControllerTime += thisTime ;
94
- NSLog(@"arrayControllerTime = %0.3f", arrayControllerTime) ;
95
- }
96
- else {
97
- otherTime += thisTime ;
98
- NSLog(@"otherTime = %0.3f", otherTime) ;
99
- }
100
- */
101
- }
102
-
103
-
104
51
- (BOOL ) tableView : (NSTableView *)tv
105
52
writeRowsWithIndexes : (NSIndexSet *)indexes
106
53
toPasteboard : (NSPasteboard *)pboard {
@@ -114,8 +61,6 @@ - (BOOL) tableView:(NSTableView *)tv
114
61
return YES ;
115
62
}
116
63
117
-
118
-
119
64
- (NSDragOperation )tableView : (NSTableView *)tv
120
65
validateDrop : (id <NSDraggingInfo >)info
121
66
proposedRow : (NSInteger )targetRow
0 commit comments