Forgot to ask yesterday...was the macro window controller change an  
intentional part of this commit?

-- 
adam

On Dec 1, 2007, at 3:48 PM, [EMAIL PROTECTED] wrote:

> Revision: 11795
>          http://bibdesk.svn.sourceforge.net/bibdesk/? 
> rev=11795&view=rev
> Author:   hofman
> Date:     2007-12-01 15:48:36 -0800 (Sat, 01 Dec 2007)
>
> Log Message:
> -----------
> Set ivars to nil after releasing them. Due to the non-standard  
> initialization sequence they could be released both in a failed init  
> and in dealloc.
>
> ===================================================================
> --- trunk/bibdesk/BDSKMacroWindowController.m 2007-12-01 23:38:50  
> UTC (rev 11794)
> +++ trunk/bibdesk/BDSKMacroWindowController.m 2007-12-01 23:48:36  
> UTC (rev 11795)
> @@ -637,6 +637,36 @@
>     return YES;
> }
>
> +- (void)replaceEveryOccurrenceOfMacroKey:(NSString *)oldKey withKey: 
> (NSString *)newKey{
> +     NSString *findStr = [NSString stringWithBibTeXString:oldKey  
> macroResolver:macroResolver];
> +     NSString *replStr = [NSString stringWithBibTeXString:newKey  
> macroResolver:macroResolver];
> +    NSArray *docs = [macroResolver isEqual:[BDSKMacroResolver  
> defaultMacroResolver]] ? [NSApp orderedDocuments] : [NSArray  
> arrayWithObjects:[macroResolver owner], nil];
> +    NSEnumerator *docEnum = [docs objectEnumerator];
> +    BibDocument *doc;
> +    NSEnumerator *pubEnum;
> +    BibItem *pub;
> +    NSEnumerator *fieldEnum;
> +    NSString *field;
> +    unsigned numRepl;
> +    NSString *oldValue;
> +    NSString *newValue;
> +
> +    while (doc = [docEnum nextObject]) {
> +        pubEnum = [[doc publications] objectEnumerator];
> +        while (pub = [pubEnum nextObject]) {
> +            fieldEnum = [[pub allFieldNames] objectEnumerator];
> +            while (field = [fieldEnum nextObject]) {
> +                oldValue = [pub valueOfField:field inherit:NO];
> +                if ([oldValue isComplex]) {
> +                    newValue = [oldValue  
> stringByReplacingOccurrencesOfString:findStr withString:replStr  
> options:NSCaseInsensitiveSearch replacements:&numRepl];
> +                    if (numRepl > 0)
> +                        [pub setField:field toValue:newValue];
> +                }
> +            }
> +        }
> +    }
> +}
> +
> #pragma mark || Methods to support the type-ahead selector.
>
> - (NSArray *)typeSelectHelperSelectionItems:(BDSKTypeSelectHelper  
> *)typeSelectHelper{
>
> Modified: trunk/bibdesk/BDSKOrphanedFileServer.m
> ===================================================================
> --- trunk/bibdesk/BDSKOrphanedFileServer.m    2007-12-01 23:38:50 UTC  
> (rev 11794)
> +++ trunk/bibdesk/BDSKOrphanedFileServer.m    2007-12-01 23:48:36 UTC  
> (rev 11795)
> @@ -68,6 +68,7 @@
>     self = [super init];
>     if(nil == self){
>         [foundFiles release];
> +        foundFiles = nil;
>     }
>     return self;
> }
> @@ -75,6 +76,7 @@
> - (void)dealloc
> {
>     [foundFiles release];
> +    foundFiles = nil;
>     [knownFiles release];
>     [baseURL release];
>     [super dealloc];
>
> Modified: trunk/bibdesk/BDSKPreviewer.m
> ===================================================================
> --- trunk/bibdesk/BDSKPreviewer.m     2007-12-01 23:38:50 UTC (rev 11794)
> +++ trunk/bibdesk/BDSKPreviewer.m     2007-12-01 23:48:36 UTC (rev 11795)
> @@ -531,8 +531,11 @@
>     self = [super init];
>     if(nil == self){
>         [texTask release];
> +        texTask = nil;
>         [queueLock release];
> +        queueLock = nil;
>         [queue release];
> +        queue = nil;
>     }
>     return self;
> }
> @@ -540,8 +543,11 @@
> - (void)dealloc;
> {
>     [texTask release];
> +    texTask = nil;
>     [queueLock release];
> +    queueLock = nil;
>     [queue release];
> +    queue = nil;
>     [super dealloc];
> }
>
>
> Modified: trunk/bibdesk/BDSKSharedGroup.m
> ===================================================================
> --- trunk/bibdesk/BDSKSharedGroup.m   2007-12-01 23:38:50 UTC (rev  
> 11794)
> +++ trunk/bibdesk/BDSKSharedGroup.m   2007-12-01 23:48:36 UTC (rev  
> 11795)
> @@ -314,6 +314,7 @@
>     if (nil == self) {
>         [service setDelegate:nil];
>         [service release];
> +        service = nil;
>     }
>     return self;
> }
> @@ -322,6 +323,7 @@
> {
>     [service setDelegate:nil];
>     [service release];
> +    service = nil;
>     [uniqueIdentifier release];
>     [super dealloc];
> }
>
> Modified: trunk/bibdesk/BDSKSharingServer.m
> ===================================================================
> --- trunk/bibdesk/BDSKSharingServer.m 2007-12-01 23:38:50 UTC (rev  
> 11794)
> +++ trunk/bibdesk/BDSKSharingServer.m 2007-12-01 23:48:36 UTC (rev  
> 11795)
> @@ -424,6 +424,7 @@
>     self = [super initNonBlocking];
>     if(nil == self){
>         [remoteClients release];
> +        remoteClients = nil;
>     }
>     return self;
> }
> @@ -431,6 +432,7 @@
> - (void)dealloc
> {
>     [remoteClients release];
> +    remoteClients = nil;
>     [super dealloc];
> }
>
>
>
> This was sent by the SourceForge.net collaborative development  
> platform, the world's largest Open Source development site.
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell.  From the desktop to the data center, Linux is going
> mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> Bibdesk-commit mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/bibdesk-commit


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to