Revision: 28499
http://sourceforge.net/p/bibdesk/svn/28499
Author: hofman
Date: 2024-01-01 15:08:37 +0000 (Mon, 01 Jan 2024)
Log Message:
-----------
ignore zone when copying
Modified Paths:
--------------
trunk/bibdesk/BDSKBookmark.m
trunk/bibdesk/BDSKCategoryGroup.m
trunk/bibdesk/BDSKComplexString.m
trunk/bibdesk/BDSKComplexStringFormatter.m
trunk/bibdesk/BDSKCondition.m
trunk/bibdesk/BDSKFileSearchResult.m
trunk/bibdesk/BDSKFilter.m
trunk/bibdesk/BDSKGroup.m
trunk/bibdesk/BDSKImagePopUpButtonCell.m
trunk/bibdesk/BDSKLinkedFile.m
trunk/bibdesk/BDSKParentGroup.m
trunk/bibdesk/BDSKPublicationsArray.m
trunk/bibdesk/BDSKRatingButtonCell.m
trunk/bibdesk/BDSKScriptGroup.m
trunk/bibdesk/BDSKSearchGroup.m
trunk/bibdesk/BDSKServerInfo.m
trunk/bibdesk/BDSKSharedGroup.m
trunk/bibdesk/BDSKSmartGroup.m
trunk/bibdesk/BDSKStaticGroup.m
trunk/bibdesk/BDSKStringNode.m
trunk/bibdesk/BDSKTextWithIconCell.m
trunk/bibdesk/BDSKToken.m
trunk/bibdesk/BDSKURLGroup.m
trunk/bibdesk/BDSKVersionNumber.m
trunk/bibdesk/BDSKWebGroup.m
trunk/bibdesk/BibAuthor.m
trunk/bibdesk/BibDocument_UI.m
trunk/bibdesk/BibItem.m
trunk/bibdesk/NSError_BDSKExtensions.m
Modified: trunk/bibdesk/BDSKBookmark.m
===================================================================
--- trunk/bibdesk/BDSKBookmark.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKBookmark.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -143,7 +143,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- return [[BDSKBookmark allocWithZone:aZone] initWithDictionary:[self
dictionaryValue]];
+ return [[BDSKBookmark alloc] initWithDictionary:[self dictionaryValue]];
}
- (void)dealloc {
Modified: trunk/bibdesk/BDSKCategoryGroup.m
===================================================================
--- trunk/bibdesk/BDSKCategoryGroup.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKCategoryGroup.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -100,7 +100,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- return [[[self class] allocWithZone:aZone] initWithName:name key:key];
+ return [[[self class] alloc] initWithName:name key:key];
}
- (void)dealloc {
Modified: trunk/bibdesk/BDSKComplexString.m
===================================================================
--- trunk/bibdesk/BDSKComplexString.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKComplexString.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -362,7 +362,7 @@
if (NSShouldRetainWithZone(self, zone))
return [self retain];
else
- return [[BDSKComplexString allocWithZone:zone] initWithNodes:nodes
macroResolver:macroResolver isComplex:isComplex isInherited:isInherited];
+ return [[BDSKComplexString alloc] initWithNodes:nodes
macroResolver:macroResolver isComplex:isComplex isInherited:isInherited];
}
Modified: trunk/bibdesk/BDSKComplexStringFormatter.m
===================================================================
--- trunk/bibdesk/BDSKComplexStringFormatter.m 2024-01-01 11:12:19 UTC (rev
28498)
+++ trunk/bibdesk/BDSKComplexStringFormatter.m 2024-01-01 15:08:37 UTC (rev
28499)
@@ -61,7 +61,7 @@
}
- (id)copyWithZone:(NSZone *)zone {
- return [[[self class] allocWithZone:zone]
initWithMacroResolver:macroResolver];
+ return [[[self class] alloc] initWithMacroResolver:macroResolver];
}
- (void)dealloc {
Modified: trunk/bibdesk/BDSKCondition.m
===================================================================
--- trunk/bibdesk/BDSKCondition.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKCondition.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -169,7 +169,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- BDSKCondition *copy = [[BDSKCondition allocWithZone:aZone] init];
+ BDSKCondition *copy = [[BDSKCondition alloc] init];
// the order is important
[copy setKey:[self key]];
[copy setComparison:[self comparison]];
Modified: trunk/bibdesk/BDSKFileSearchResult.m
===================================================================
--- trunk/bibdesk/BDSKFileSearchResult.m 2024-01-01 11:12:19 UTC (rev
28498)
+++ trunk/bibdesk/BDSKFileSearchResult.m 2024-01-01 15:08:37 UTC (rev
28499)
@@ -75,7 +75,7 @@
- (id)copyWithZone:(NSZone *)zone
{
- return [[[self class] allocWithZone:zone] initWithURL:url
identifierURL:identifierURL title:string score:score];
+ return [[[self class] alloc] initWithURL:url identifierURL:identifierURL
title:string score:score];
}
- (NSString *)description
Modified: trunk/bibdesk/BDSKFilter.m
===================================================================
--- trunk/bibdesk/BDSKFilter.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKFilter.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -113,7 +113,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- return [[BDSKFilter allocWithZone:aZone] initWithConditions:[self
conditions] conjunction:[self conjunction]];
+ return [[BDSKFilter alloc] initWithConditions:[self conditions]
conjunction:[self conjunction]];
}
- (NSString *)description {
Modified: trunk/bibdesk/BDSKGroup.m
===================================================================
--- trunk/bibdesk/BDSKGroup.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKGroup.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -100,7 +100,7 @@
// NSCopying protocol, used by the duplicate action
- (id)copyWithZone:(NSZone *)aZone {
- return [[[self class] allocWithZone:aZone] initWithName:name];
+ return [[[self class] alloc] initWithName:name];
}
- (void)dealloc {
Modified: trunk/bibdesk/BDSKImagePopUpButtonCell.m
===================================================================
--- trunk/bibdesk/BDSKImagePopUpButtonCell.m 2024-01-01 11:12:19 UTC (rev
28498)
+++ trunk/bibdesk/BDSKImagePopUpButtonCell.m 2024-01-01 15:08:37 UTC (rev
28499)
@@ -74,7 +74,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- BDSKImagePopUpButtonCell *copy = [super copyWithZone:aZone];
+ BDSKImagePopUpButtonCell *copy = [super copy];
[copy makeButtonCell];
return copy;
}
Modified: trunk/bibdesk/BDSKLinkedFile.m
===================================================================
--- trunk/bibdesk/BDSKLinkedFile.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKLinkedFile.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -458,7 +458,7 @@
anAlias = [alias retain];
}
}
- self = [[[self class] allocWithZone:aZone] initWithAlias:anAlias
relativePath:relativePath delegate:nil];
+ self = [[[self class] alloc] initWithAlias:anAlias
relativePath:relativePath delegate:nil];
[anAlias release];
return self;
}
@@ -1056,7 +1056,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- return [[[self class] allocWithZone:aZone] initWithURL:URL delegate:nil];
+ return [[[self class] alloc] initWithURL:URL delegate:nil];
}
- (id)initWithCoder:(NSCoder *)coder {
Modified: trunk/bibdesk/BDSKParentGroup.m
===================================================================
--- trunk/bibdesk/BDSKParentGroup.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKParentGroup.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -80,7 +80,7 @@
- (id)copyWithZone:(NSZone *)aZone {
BDSKASSERT_NOT_REACHED("Parent groups should never be copied");
- return [[[self class] allocWithZone:aZone] initWithName:name];
+ return [[[self class] alloc] initWithName:name];
}
- (void)dealloc {
Modified: trunk/bibdesk/BDSKPublicationsArray.m
===================================================================
--- trunk/bibdesk/BDSKPublicationsArray.m 2024-01-01 11:12:19 UTC (rev
28498)
+++ trunk/bibdesk/BDSKPublicationsArray.m 2024-01-01 15:08:37 UTC (rev
28499)
@@ -152,11 +152,11 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- return [publications copyWithZone:aZone];
+ return [publications copy];
}
- (id)mutableCopyWithZone:(NSZone *)aZone {
- return [publications mutableCopyWithZone:aZone];
+ return [publications mutableCopy];
}
- (BDSKPublicationsArray *)copyTemporary {
Modified: trunk/bibdesk/BDSKRatingButtonCell.m
===================================================================
--- trunk/bibdesk/BDSKRatingButtonCell.m 2024-01-01 11:12:19 UTC (rev
28498)
+++ trunk/bibdesk/BDSKRatingButtonCell.m 2024-01-01 15:08:37 UTC (rev
28499)
@@ -85,7 +85,7 @@
}
- (id)copyWithZone:(NSZone *)zone {
- id cellCopy = [super copyWithZone:zone];
+ id cellCopy = [super copy];
[cellCopy setMaxRating:[self maxRating]];
[cellCopy setRating:[self rating]];
return cellCopy;
Modified: trunk/bibdesk/BDSKScriptGroup.m
===================================================================
--- trunk/bibdesk/BDSKScriptGroup.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKScriptGroup.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -148,7 +148,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- return [[[self class] allocWithZone:aZone] initWithName:name
scriptPath:scriptPath scriptArguments:scriptArguments scriptType:scriptType];
+ return [[[self class] alloc] initWithName:name scriptPath:scriptPath
scriptArguments:scriptArguments scriptType:scriptType];
}
- (void)dealloc;
Modified: trunk/bibdesk/BDSKSearchGroup.m
===================================================================
--- trunk/bibdesk/BDSKSearchGroup.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKSearchGroup.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -173,7 +173,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- return [[[self class] allocWithZone:aZone] initWithServerInfo:[self
serverInfo] searchTerm:searchTerm];
+ return [[[self class] alloc] initWithServerInfo:[self serverInfo]
searchTerm:searchTerm];
}
- (void)dealloc
Modified: trunk/bibdesk/BDSKServerInfo.m
===================================================================
--- trunk/bibdesk/BDSKServerInfo.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKServerInfo.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -170,7 +170,7 @@
- (id)copyWithZone:(NSZone *)aZone {
[passwordLock lockForReading];
- id copy = [[BDSKServerInfo allocWithZone:aZone] initWithType:[self type]
name:[self name] database:[self database] host:[self host] port:[self port]
options:options password:password passwordInKeychain:passwordInKeychain];
+ id copy = [[BDSKServerInfo alloc] initWithType:[self type] name:[self
name] database:[self database] host:[self host] port:[self port]
options:options password:password passwordInKeychain:passwordInKeychain];
[passwordLock unlock];
return copy;
}
@@ -177,7 +177,7 @@
- (id)mutableCopyWithZone:(NSZone *)aZone {
[passwordLock lockForReading];
- id copy = [[BDSKMutableServerInfo allocWithZone:aZone] initWithType:[self
type] name:[self name] database:[self database] host:[self host] port:[self
port] options:options password:password passwordInKeychain:passwordInKeychain];
+ id copy = [[BDSKMutableServerInfo alloc] initWithType:[self type]
name:[self name] database:[self database] host:[self host] port:[self port]
options:options password:password passwordInKeychain:passwordInKeychain];
[passwordLock unlock];
return copy;
}
Modified: trunk/bibdesk/BDSKSharedGroup.m
===================================================================
--- trunk/bibdesk/BDSKSharedGroup.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKSharedGroup.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -138,7 +138,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- return [(BDSKSharedGroup *)[[self class] allocWithZone:aZone]
initWithClient:client];
+ return [(BDSKSharedGroup *)[[self class] alloc] initWithClient:client];
}
// Logging
Modified: trunk/bibdesk/BDSKSmartGroup.m
===================================================================
--- trunk/bibdesk/BDSKSmartGroup.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKSmartGroup.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -105,7 +105,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- return [[[self class] allocWithZone:aZone] initWithName:name
filter:filter];
+ return [[[self class] alloc] initWithName:name filter:filter];
}
- (void)dealloc {
Modified: trunk/bibdesk/BDSKStaticGroup.m
===================================================================
--- trunk/bibdesk/BDSKStaticGroup.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKStaticGroup.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -106,7 +106,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- return [[[self class] allocWithZone:aZone] initWithName:name
publications:publications];
+ return [[[self class] alloc] initWithName:name
publications:publications];
}
- (void)dealloc {
Modified: trunk/bibdesk/BDSKStringNode.m
===================================================================
--- trunk/bibdesk/BDSKStringNode.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKStringNode.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -75,10 +75,7 @@
}
- (id)copyWithZone:(NSZone *)zone{
- if (NSShouldRetainWithZone(self, zone))
- return [self retain];
- else
- return [[[self class] allocWithZone:zone] initWithType:type
value:value];
+ return [self retain];
}
- (id)initWithCoder:(NSCoder *)coder{
Modified: trunk/bibdesk/BDSKTextWithIconCell.m
===================================================================
--- trunk/bibdesk/BDSKTextWithIconCell.m 2024-01-01 11:12:19 UTC (rev
28498)
+++ trunk/bibdesk/BDSKTextWithIconCell.m 2024-01-01 15:08:37 UTC (rev
28499)
@@ -100,7 +100,7 @@
- (id)copyWithZone:(NSZone *)zone {
BDSKTextWithIconCell *copy = [super copyWithZone:zone];
- copy->imageCell = [imageCell copyWithZone:zone];
+ copy->imageCell = [imageCell copy];
return copy;
}
Modified: trunk/bibdesk/BDSKToken.m
===================================================================
--- trunk/bibdesk/BDSKToken.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKToken.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -150,7 +150,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- BDSKToken *copy = [[[self class] allocWithZone:aZone] initWithTitle:title];
+ BDSKToken *copy = [[[self class] alloc] initWithTitle:title];
[copy setFontName:fontName];
[copy setFontSize:fontSize];
[copy setBold:bold];
Modified: trunk/bibdesk/BDSKURLGroup.m
===================================================================
--- trunk/bibdesk/BDSKURLGroup.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKURLGroup.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -117,7 +117,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- return [[[self class] allocWithZone:aZone] initWithName:name URL:URL];
+ return [[[self class] alloc] initWithName:name URL:URL];
}
- (void)cleanup {
Modified: trunk/bibdesk/BDSKVersionNumber.m
===================================================================
--- trunk/bibdesk/BDSKVersionNumber.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKVersionNumber.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -195,10 +195,7 @@
- (id)copyWithZone:(NSZone *)zone;
{
- if (NSShouldRetainWithZone(self, zone))
- return [self retain];
- else
- return [[[self class] allocWithZone:zone]
initWithVersionString:originalVersionString];
+ return [self retain];
}
#pragma mark Comparison
Modified: trunk/bibdesk/BDSKWebGroup.m
===================================================================
--- trunk/bibdesk/BDSKWebGroup.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BDSKWebGroup.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -108,7 +108,7 @@
}
- (id)copyWithZone:(NSZone *)aZone {
- BDSKWebGroup *copy = [[[self class] allocWithZone:aZone] init];
+ BDSKWebGroup *copy = [[[self class] alloc] init];
NSURL *url = [self URL];
if (url)
[copy setURL:url];
Modified: trunk/bibdesk/BibAuthor.m
===================================================================
--- trunk/bibdesk/BibAuthor.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BibAuthor.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -137,10 +137,7 @@
- (id)copyWithZone:(NSZone *)zone{
// authors are immutable
- if (NSShouldRetainWithZone(self, zone))
- return [self retain];
- else
- return [[[self class] allocWithZone:zone] initWithName:originalName
publication:publication forField:field];
+ return [self retain];
}
- (id)initWithCoder:(NSCoder *)coder{
Modified: trunk/bibdesk/BibDocument_UI.m
===================================================================
--- trunk/bibdesk/BibDocument_UI.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BibDocument_UI.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -898,7 +898,7 @@
for (i = 1; i < count; i++) {
item = [actionMenu itemAtIndex:i];
if ([item isSeparatorItem]) break;
- [menu addItem:[[item copyWithZone:[menu zone]] autorelease]];
+ [menu addItem:[[item copy] autorelease]];
}
}else{
[self menuNeedsUpdate:alternateCopyMenu];
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2024-01-01 11:12:19 UTC (rev 28498)
+++ trunk/bibdesk/BibItem.m 2024-01-01 15:08:37 UTC (rev 28499)
@@ -325,8 +325,8 @@
- (id)copyWithZone:(NSZone *)zone{
// We set isNew to YES because this is used for duplicate, either from the
menu or AppleScript, and these items are supposed to be newly added to the
document so who0uld have their Date-Added field set to now
// Note that unless someone uses Date-Added or Date-Modified as a default
field, a copy is equal according to isEqualToItem:
- NSArray *filesCopy = [[NSArray allocWithZone: zone] initWithArray:files
copyItems:YES];
- BibItem *theCopy = [[[self class] allocWithZone: zone]
initWithType:pubType citeKey:citeKey pubFields:pubFields files:filesCopy
isNew:YES];
+ NSArray *filesCopy = [[NSArray alloc] initWithArray:files copyItems:YES];
+ BibItem *theCopy = [[[self class] alloc] initWithType:pubType
citeKey:citeKey pubFields:pubFields files:filesCopy isNew:YES];
[filesCopy release];
[theCopy setMacroResolver:[self macroResolver]];
return theCopy;
Modified: trunk/bibdesk/NSError_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSError_BDSKExtensions.m 2024-01-01 11:12:19 UTC (rev
28498)
+++ trunk/bibdesk/NSError_BDSKExtensions.m 2024-01-01 15:08:37 UTC (rev
28499)
@@ -77,7 +77,7 @@
- (id)copyWithZone:(NSZone *)aZone
{
- return [[NSError allocWithZone:aZone] initWithDomain:[self domain]
code:[self code] userInfo:[self userInfo]];
+ return [[NSError alloc] initWithDomain:[self domain] code:[self code]
userInfo:[self userInfo]];
}
- (NSDictionary *)userInfo
@@ -149,7 +149,7 @@
- (id)mutableCopyWithZone:(NSZone *)aZone;
{
- return [[BDSKMutableError allocWithZone:aZone] initWithDomain:[self
domain] code:[self code] userInfo:[self userInfo]];
+ return [[BDSKMutableError alloc] initWithDomain:[self domain] code:[self
code] userInfo:[self userInfo]];
}
- (id)valueForUndefinedKey:(NSString *)aKey
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