Revision: 24048
http://sourceforge.net/p/bibdesk/svn/24048
Author: hofman
Date: 2019-07-18 14:53:06 +0000 (Thu, 18 Jul 2019)
Log Message:
-----------
synthesize private date setters
Modified Paths:
--------------
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2019-07-18 13:56:30 UTC (rev 24047)
+++ trunk/bibdesk/BibItem.m 2019-07-18 14:53:06 UTC (rev 24048)
@@ -98,11 +98,16 @@
static NSSet *fieldsToWriteIfEmpty = nil;
+@interface BibItem ()
+
+@property (nonatomic, retain) NSDate *date;
+@property (nonatomic, retain) NSDate *dateAdded;
+@property (nonatomic, retain) NSDate *dateModified;
+
+@end
+
@interface BibItem (Private)
-- (void)setDateAdded:(NSDate *)newDateAdded;
-- (void)setDateModified:(NSDate *)newDateModified;
-- (void)setDate:(NSDate *)newDate;
- (void)setPubTypeString:(NSString *)newType;
- (void)setCiteKeyString:(NSString *)newCiteKey;
@@ -192,8 +197,8 @@
@implementation BibItem
-@synthesize owner, macroResolver, downloads, fileOrder, identifierURL,
dateAdded, dateModified, pubType, citeKey, hasBeenEdited, pubFields,
searchScore, imported, itemIndex=currentIndex;
-@dynamic undoManager, localFiles, existingLocalFiles, remoteURLs, usedMacros,
usedLocalMacros, allPeople, people, numberOfAuthors, pubAuthors,
pubAuthorsForDisplay, firstAuthor, secondAuthor, thirdAuthor, lastAuthor,
bibTeXAuthorString, numberOfAuthorsOrEditors, pubAuthorsOrEditors,
pubAuthorsOrEditorsForDisplay, firstAuthorOrEditor, secondAuthorOrEditor,
thirdAuthorOrEditor, lastAuthorOrEditor, crossrefParent, title, displayTitle,
container, date, rating, color, suggestedCiteKey, hasEmptyOrDefaultCiteKey,
canGenerateAndSetCiteKey, allFieldNames, searchIndexInfo, completionObject,
bibTeXString, RISStringValue, MODSXMLValue, endNoteXMLValue, wordXMLValue,
RSSStringValue, allFieldsString, requiredFields, optionalFields, defaultFields,
allFields, fields, urls, persons, authors, editors, authorsOrEditors,
currentDate, textSkimNotes, richTextSkimNotes, linkedText, remoteURL, localURL,
localUrlPath, URLFields, skimNotesForLocalURL, bdskURL;
+@synthesize owner, macroResolver, downloads, fileOrder, identifierURL,
date=pubDate, dateAdded, dateModified, pubType, citeKey, hasBeenEdited,
pubFields, searchScore, imported, itemIndex=currentIndex;
+@dynamic undoManager, localFiles, existingLocalFiles, remoteURLs, usedMacros,
usedLocalMacros, allPeople, people, numberOfAuthors, pubAuthors,
pubAuthorsForDisplay, firstAuthor, secondAuthor, thirdAuthor, lastAuthor,
bibTeXAuthorString, numberOfAuthorsOrEditors, pubAuthorsOrEditors,
pubAuthorsOrEditorsForDisplay, firstAuthorOrEditor, secondAuthorOrEditor,
thirdAuthorOrEditor, lastAuthorOrEditor, crossrefParent, title, displayTitle,
container, rating, color, suggestedCiteKey, hasEmptyOrDefaultCiteKey,
canGenerateAndSetCiteKey, allFieldNames, searchIndexInfo, completionObject,
bibTeXString, RISStringValue, MODSXMLValue, endNoteXMLValue, wordXMLValue,
RSSStringValue, allFieldsString, requiredFields, optionalFields, defaultFields,
allFields, fields, urls, persons, authors, editors, authorsOrEditors,
currentDate, textSkimNotes, richTextSkimNotes, linkedText, remoteURL, localURL,
localUrlPath, URLFields, skimNotesForLocalURL, bdskURL;
+ (void)initialize
{
@@ -3835,28 +3840,6 @@
@implementation BibItem (Private)
-// The date setters should only be used at initialization or from
updateMetadata:forKey:. If you want to change the date, change the value in
pubFields, and let updateMetadata handle the ivar.
-- (void)setDate: (NSDate *)newDate{
- if(newDate != pubDate){
- [pubDate release];
- pubDate = [newDate retain];
- }
-}
-
-- (void)setDateAdded:(NSDate *)newDateAdded {
- if(newDateAdded != dateAdded){
- [dateAdded release];
- dateAdded = [newDateAdded retain];
- }
-}
-
-- (void)setDateModified:(NSDate *)newDateModified {
- if(newDateModified != dateModified){
- [dateModified release];
- dateModified = [newDateModified retain];
- }
-}
-
- (void)setPubTypeString:(NSString *)newType{
newType = [newType entryType];
BDSKASSERT(![NSString isEmptyString:newType]);
@@ -3877,6 +3860,7 @@
}
}
+// The date setters should only be used at initialization or from
updateMetadata:forKey:. If you want to change the date, change the value in
pubFields, and let updateMetadata handle the ivar.
- (void)updateMetadataForKey:(NSString *)key{
[self setHasBeenEdited:YES];
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