Revision: 29109
http://sourceforge.net/p/bibdesk/svn/29109
Author: hofman
Date: 2025-04-15 21:40:16 +0000 (Tue, 15 Apr 2025)
Log Message:
-----------
Rwemove KVO observer with context when available. Fix directive condition.
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-15
16:48:47 UTC (rev 29108)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-15
21:40:16 UTC (rev 29109)
@@ -921,7 +921,12 @@
if ([binding isEqualToString:CONTENT_BINDING_NAME]) {
FVAPIAssert2(nil != _contentBinding, @"%@: attempt to unbind %@ when
unbound", self, binding);
- [[_contentBinding objectForKey:NSObservedObjectKey]
removeObserver:self forKeyPath:[_contentBinding
objectForKey:NSObservedKeyPathKey]];
+#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MIN_REQUIRED <
MAC_OS_X_VERSION_10_7
+ if (![NSObject
instancesRespondToSelector:@selector(removeObserver:forKeyPath:context:)])
+ [[_contentBinding objectForKey:NSObservedObjectKey]
removeObserver:self forKeyPath:[_contentBinding
objectForKey:NSObservedKeyPathKey]];
+ else
+#endif
+ [[_contentBinding objectForKey:NSObservedObjectKey]
removeObserver:self forKeyPath:[_contentBinding
objectForKey:NSObservedKeyPathKey]
context:&_FVFileViewContentObservationContext];
_contentBinding = nil;
[self setIconURLs:nil];
@@ -3439,7 +3444,7 @@
[self _setSelectionIndexes:[self
_allIndexesInRubberBandRect:rubberBandRect]];
if (_rubberBandView == nil)
_rubberBandView = [[FVRubberBandView alloc]
initWithFrame:NSZeroRect];
-#if !defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MIN_REQUIRED <
MAC_OS_X_VERSION_10_7
+#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MIN_REQUIRED <
MAC_OS_X_VERSION_10_7
if (NO == [self
respondsToSelector:@selector(backingAlignedRect:options:)])
rubberBandRect = [self centerScanRect:NSInsetRect(rubberBandRect,
0.5, 0.5)];
else
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit