Revision: 28536
          http://sourceforge.net/p/bibdesk/svn/28536
Author:   hofman
Date:     2024-01-04 16:38:01 +0000 (Thu, 04 Jan 2024)
Log Message:
-----------
make statusBar and mainView strong as they may be swapped

Modified Paths:
--------------
    trunk/bibdesk/BibDocument.h
    trunk/bibdesk/BibDocument.m
    trunk/bibdesk/BibDocument_Actions.m

Modified: trunk/bibdesk/BibDocument.h
===================================================================
--- trunk/bibdesk/BibDocument.h 2024-01-04 16:32:12 UTC (rev 28535)
+++ trunk/bibdesk/BibDocument.h 2024-01-04 16:38:01 UTC (rev 28536)
@@ -303,9 +303,9 @@
 @property (nonatomic, assign) IBOutlet BDSKMainTableView *tableView;
 @property (nonatomic, assign) IBOutlet NSSplitView *splitView;
 @property (nonatomic, assign) IBOutlet BDSKColoredView *mainBox;
-@property (nonatomic, assign) IBOutlet NSView *mainView;
+@property (nonatomic, strong) IBOutlet NSView *mainView;
 @property (nonatomic, assign) IBOutlet NSView *controlContentView;
-@property (nonatomic, assign) IBOutlet BDSKStatusBar *statusBar;
+@property (nonatomic, strong) IBOutlet BDSKStatusBar *statusBar;
 @property (nonatomic, assign) IBOutlet BDSKGroupOutlineView *groupOutlineView;
 @property (nonatomic, assign) IBOutlet NSSplitView *groupSplitView;
 @property (nonatomic, assign) IBOutlet NSPopUpButton *groupActionButton;

Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2024-01-04 16:32:12 UTC (rev 28535)
+++ trunk/bibdesk/BibDocument.m 2024-01-04 16:38:01 UTC (rev 28536)
@@ -281,6 +281,8 @@
     [[NSNotificationCenter defaultCenter] removeObserver:self];
     [[NSDistributedNotificationCenter defaultCenter] removeObserver:self];
     BDSKDESTROY(mainSplitView);
+    BDSKDESTROY(mainView);
+    BDSKDESTROY(statusBar);
     BDSKDESTROY(basePath);
     BDSKDESTROY(fileSearchController);
     BDSKDESTROY(pboardHelper);
@@ -391,7 +393,6 @@
     [documentWindow setContentBorderThickness:NSHeight([statusBar frame]) 
forEdge:NSMinYEdge];
     
     // First remove the statusbar if we should, as it affects proper resizing 
of the window and splitViews
-       [statusBar retain]; // we need to retain, as we might remove it from 
the window
     [statusBar setAlignment:NSTextAlignmentCenter];
        if ([sud boolForKey:BDSKShowStatusBarKey] == NO)
                [self toggleStatusBar:nil];

Modified: trunk/bibdesk/BibDocument_Actions.m
===================================================================
--- trunk/bibdesk/BibDocument_Actions.m 2024-01-04 16:32:12 UTC (rev 28535)
+++ trunk/bibdesk/BibDocument_Actions.m 2024-01-04 16:38:01 UTC (rev 28536)
@@ -1298,10 +1298,8 @@
         [mainSplitView setVertical:YES];
         [mainSplitView setDividerStyle:NSSplitViewDividerStyleThin];
         [mainSplitView setDelegate:self];
-        [mainView retain];
         [splitView replaceSubview:mainView with:mainSplitView];
         [mainSplitView addSubview:mainView];
-        [mainView release];
         [mainSplitView addSubview:view positioned:NSWindowAbove 
relativeTo:nil];
         [mainSplitView setPosition:[mainSplitView 
maxPossiblePositionOfDividerAtIndex:0] - [mainSplitView dividerThickness] - 
width ofDividerAtIndex:0 animate:YES];
     } 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

Reply via email to