Revision: 18416
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18416&view=rev
Author: hofman
Date: 2012-01-18 11:01:14 +0000 (Wed, 18 Jan 2012)
Log Message:
-----------
retain/release in different methods
Modified Paths:
--------------
trunk/bibdesk/BDSKFiler.m
trunk/bibdesk/BDSKFilerErrorController.m
Modified: trunk/bibdesk/BDSKFiler.m
===================================================================
--- trunk/bibdesk/BDSKFiler.m 2012-01-18 10:37:45 UTC (rev 18415)
+++ trunk/bibdesk/BDSKFiler.m 2012-01-18 11:01:14 UTC (rev 18416)
@@ -225,7 +225,7 @@
if ([errorInfoDicts count] > 0) {
BDSKFilerErrorController *errorController =
[[[BDSKFilerErrorController alloc] initWithErrors:errorInfoDicts forField:field
fromDocument:doc options:mask] autorelease];
- [[errorController window] makeKeyAndOrderFront:nil];
+ [errorController showWindow:nil];
}
return [fileInfoDicts count] > 0;
Modified: trunk/bibdesk/BDSKFilerErrorController.m
===================================================================
--- trunk/bibdesk/BDSKFilerErrorController.m 2012-01-18 10:37:45 UTC (rev
18415)
+++ trunk/bibdesk/BDSKFilerErrorController.m 2012-01-18 11:01:14 UTC (rev
18416)
@@ -77,7 +77,7 @@
return self;
}
-- (void)dealloc {
+- (void)dealloc {log_method();
[tv setDelegate:nil];
[tv setDataSource:nil];
BDSKDESTROY(errorInfoDicts);
@@ -96,16 +96,22 @@
[tv setDoubleAction:@selector(showFile:)];
[tv setTarget:self];
-
- // we have to stay around until the window closes, also see the two
actions below
- [self retain];
}
+- (void)windowWillClose:(NSNotification *)notification {
+ [self autorelease];
+}
+
#pragma mark Actions
+- (IBAction)showWindow:(id)sender {
+ // we have to stay around until the window closes, this is balanced in
windowWillClose:
+ [self retain];
+ [super showWindow:sender];
+}
+
- (IBAction)done:(id)sender{
[self close];
- [self autorelease];
}
- (IBAction)tryAgain:(id)sender{
@@ -132,8 +138,6 @@
[self close];
[[BDSKFiler sharedFiler] movePapers:fileInfoDicts forField:field
fromDocument:doc options:mask];
-
- [self autorelease];
}
- (IBAction)dump:(id)sender{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit