Revision: 24078
http://sourceforge.net/p/bibdesk/svn/24078
Author: hofman
Date: 2019-07-24 09:34:35 +0000 (Wed, 24 Jul 2019)
Log Message:
-----------
synthesize name property, retain name property
Modified Paths:
--------------
trunk/bibdesk/BDSKField.m
trunk/bibdesk/BDSKFieldInfo.m
trunk/bibdesk/BDSKInfo.m
trunk/bibdesk/BDSKMacro.m
trunk/bibdesk/BDSKTypeInfo.m
Modified: trunk/bibdesk/BDSKField.m
===================================================================
--- trunk/bibdesk/BDSKField.m 2019-07-23 22:02:28 UTC (rev 24077)
+++ trunk/bibdesk/BDSKField.m 2019-07-24 09:34:35 UTC (rev 24078)
@@ -47,8 +47,8 @@
*/
@implementation BDSKField
-@synthesize publication=bibItem;
-@dynamic name, value, bibTeXString, integerValue, URLStringValue,
fileURLValue, relativePathValue, inherited, scriptingAuthors,
scriptingPublications;
+@synthesize publication=bibItem, name;
+@dynamic value, bibTeXString, integerValue, URLStringValue, fileURLValue,
relativePathValue, inherited, scriptingAuthors, scriptingPublications;
+ (BOOL)accessInstanceVariablesDirectly {
return NO;
@@ -57,7 +57,7 @@
- (id)initWithName:(NSString *)newName bibItem:(BibItem *)newBibItem {
self = [super init];
if (self) {
- name = [newName copy];
+ name = [newName retain];
bibItem = newBibItem;
}
return self;
@@ -85,10 +85,6 @@
return [NSString stringWithFormat:@"%@: {%@ = %@}",[self class], [self
name], [self value]];
}
-- (NSString *)name {
- return [[name retain] autorelease];
-}
-
- (NSString *)value {
return [bibItem valueOfField:name inherit:[name isIntegerField] == NO &&
[name isNoteField] == NO] ?: @"";
}
Modified: trunk/bibdesk/BDSKFieldInfo.m
===================================================================
--- trunk/bibdesk/BDSKFieldInfo.m 2019-07-23 22:02:28 UTC (rev 24077)
+++ trunk/bibdesk/BDSKFieldInfo.m 2019-07-24 09:34:35 UTC (rev 24078)
@@ -49,7 +49,7 @@
- (id)initWithName:(NSString *)newName {
self = [super init];
if (self) {
- name = [[newName fieldName] copy];
+ name = [[newName fieldName] retain];
}
return self;
}
Modified: trunk/bibdesk/BDSKInfo.m
===================================================================
--- trunk/bibdesk/BDSKInfo.m 2019-07-23 22:02:28 UTC (rev 24077)
+++ trunk/bibdesk/BDSKInfo.m 2019-07-24 09:34:35 UTC (rev 24078)
@@ -40,13 +40,13 @@
@implementation BDSKInfo
-@synthesize document;
-@dynamic name, value;
+@synthesize document, name;
+@dynamic value;
- (id)initWithName:(NSString *)newName document:(BibDocument *)newDocument {
self = [super init];
if (self) {
- name = [newName copy];
+ name = [newName retain];
document = newDocument;
}
return self;
@@ -74,10 +74,6 @@
return [NSString stringWithFormat:@"%@: {%@ = %@}",[self class], [self
name], [self value]];
}
-- (NSString *)name {
- return [[name retain] autorelease];
-}
-
- (NSString *)value {
return [document documentInfoForKey:name];
}
Modified: trunk/bibdesk/BDSKMacro.m
===================================================================
--- trunk/bibdesk/BDSKMacro.m 2019-07-23 22:02:28 UTC (rev 24077)
+++ trunk/bibdesk/BDSKMacro.m 2019-07-24 09:34:35 UTC (rev 24078)
@@ -46,8 +46,8 @@
@implementation BDSKMacro
-@synthesize macroResolver;
-@dynamic name, value, bibTeXString, external;
+@synthesize macroResolver, name;
+@dynamic value, bibTeXString, external;
+ (BOOL)accessInstanceVariablesDirectly {
return NO;
@@ -56,7 +56,7 @@
- (id)initWithName:(NSString *)aName macroResolver:(BDSKMacroResolver
*)aMacroResolver {
self = [super init];
if (self) {
- name = [aName copy];
+ name = [aName retain];
macroResolver = aMacroResolver;
}
return self;
@@ -103,10 +103,6 @@
return [NSString stringWithFormat:@"%@: {%@ = %@}, resolver = %@",[super
description], [self name], [self value], [self macroResolver]];
}
-- (NSString *)name {
- return [[name retain] autorelease];
-}
-
- (void)setName:(NSString *)newName {
if ([macroResolver owner] && [[macroResolver owner] isDocument]) {
if ([newName rangeOfCharacterFromSet:[[BDSKTypeManager sharedManager]
invalidFieldNameCharacterSet]].location == NSNotFound) {
Modified: trunk/bibdesk/BDSKTypeInfo.m
===================================================================
--- trunk/bibdesk/BDSKTypeInfo.m 2019-07-23 22:02:28 UTC (rev 24077)
+++ trunk/bibdesk/BDSKTypeInfo.m 2019-07-24 09:34:35 UTC (rev 24078)
@@ -50,7 +50,7 @@
- (id)initWithName:(NSString *)newName {
self = [super init];
if (self) {
- name = [[newName entryType] copy];
+ name = [[newName entryType] 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