Revision: 27761
          http://sourceforge.net/p/bibdesk/svn/27761
Author:   hofman
Date:     2022-07-24 18:47:24 +0000 (Sun, 24 Jul 2022)
Log Message:
-----------
make sure iconURLs is KVO compliant when using a dataSource, as the 
documentation suggests

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h      2022-07-24 
18:30:22 UTC (rev 27760)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h      2022-07-24 
18:47:24 UTC (rev 27761)
@@ -261,6 +261,7 @@
     NSMutableArray          *_downloads;
     NSMutableDictionary     *_progressIndicators;
     CFRunLoopTimerRef        _progressTimer;
+    NSMutableArray          *_accessibilityIcons;
     NSMutableSet            *_modificationSet;
     NSLock                  *_modificationLock;
     FVBackgroundView        *_backgroundView;

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2022-07-24 
18:30:22 UTC (rev 27760)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2022-07-24 
18:47:24 UTC (rev 27761)
@@ -1814,6 +1814,7 @@
     BOOL isBound = nil != _contentBinding;
     
     if (NO == isBound) {
+        [self willChangeValueForKey:@"iconURLs"];
         if (nil == _orderedURLs)
             _orderedURLs = [[NSMutableArray alloc] init];
         else
@@ -1864,7 +1865,10 @@
         insertObjectAtIndex(_orderedIcons, insertSel, icon, i);
         if (_orderedSubtitles)
             insertObjectAtIndex(_orderedSubtitles, insertSel, 
subtitleAtIndex(_dataSource, subtitleSel, self, i), i);
-    }  
+    }
+    
+    if (NO == isBound)
+        [self didChangeValueForKey:@"iconURLs"];
 }
 
 - (void)reloadIcons;

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

Reply via email to