Revision: 27645
          http://sourceforge.net/p/bibdesk/svn/27645
Author:   hofman
Date:     2022-06-17 22:49:24 +0000 (Fri, 17 Jun 2022)
Log Message:
-----------
set context info in initializer and make accessor readonly

Modified Paths:
--------------
    trunk/bibdesk/BDSKAsynchronousWebParser.h
    trunk/bibdesk/BDSKAsynchronousWebParser.m

Modified: trunk/bibdesk/BDSKAsynchronousWebParser.h
===================================================================
--- trunk/bibdesk/BDSKAsynchronousWebParser.h   2022-06-17 22:46:26 UTC (rev 
27644)
+++ trunk/bibdesk/BDSKAsynchronousWebParser.h   2022-06-17 22:49:24 UTC (rev 
27645)
@@ -88,13 +88,13 @@
     id contextInfo;
 }
 
-- (id)initWithRequest:(NSURLRequest *)aRequest 
delegate:(id<BDSKCitationDownloadDelegate>)aDelegate;
+- (id)initWithRequest:(NSURLRequest *)aRequest 
delegate:(id<BDSKCitationDownloadDelegate>)aDelegate 
contextInfo:(id)aContextInfo;
 
 @property (nonatomic, readonly) NSURL *URL;
 @property (nonatomic, readonly) NSData *data;
 @property (nonatomic, readonly) NSString *string;
 @property (nonatomic, readonly) NSError *error;
-@property (nonatomic, retain) id contextInfo;
+@property (nonatomic, readonly) id contextInfo;
 
 - (void)start;
 - (void)cancel;

Modified: trunk/bibdesk/BDSKAsynchronousWebParser.m
===================================================================
--- trunk/bibdesk/BDSKAsynchronousWebParser.m   2022-06-17 22:46:26 UTC (rev 
27644)
+++ trunk/bibdesk/BDSKAsynchronousWebParser.m   2022-06-17 22:49:24 UTC (rev 
27645)
@@ -144,11 +144,8 @@
 }
 
 - (void)addDownloadWithRequest:(NSURLRequest *)request 
contextInfo:(id)contextInfo {
-    BDSKCitationDownload *download = [[BDSKCitationDownload alloc] 
initWithRequest:request delegate:self];
+    BDSKCitationDownload *download = [[BDSKCitationDownload alloc] 
initWithRequest:request delegate:self contextInfo:contextInfo];
     
-    if (contextInfo)
-        [download setContextInfo:contextInfo];
-    
     if (downloads == nil)
         downloads = [[NSMutableArray alloc] init];
     [downloads addObject:download];
@@ -190,11 +187,12 @@
     [super dealloc];
 }
 
-- (id)initWithRequest:(NSURLRequest *)aRequest 
delegate:(id<BDSKCitationDownloadDelegate>)aDelegate {
+- (id)initWithRequest:(NSURLRequest *)aRequest 
delegate:(id<BDSKCitationDownloadDelegate>)aDelegate 
contextInfo:(id)aContextInfo {
     self = [super init];
     if (self) {
         request = [aRequest retain];
         delegate = aDelegate;
+        contextInfo = [aContextInfo retain];
     }
     return self;
 }

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