Revision: 24012
http://sourceforge.net/p/bibdesk/svn/24012
Author: hofman
Date: 2019-07-12 22:20:02 +0000 (Fri, 12 Jul 2019)
Log Message:
-----------
cover method for fields of a given type
Modified Paths:
--------------
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2019-07-12 22:11:35 UTC (rev 24011)
+++ trunk/bibdesk/BibItem.m 2019-07-12 22:20:02 UTC (rev 24012)
@@ -2517,25 +2517,23 @@
return [[self fields] fieldsWithNames:allFields];
}
-- (BDSKFieldCollection *)fields{
+- (BDSKFieldCollection *)fieldsOfType:(BDSKFieldCollectionType)aType {
if (templateFields == nil)
templateFields = [[BDSKFieldCollection alloc] initWithItem:self];
- [templateFields setType:BDSKStringFieldCollection];
+ [templateFields setType:aType];
return templateFields;
}
+- (BDSKFieldCollection *)fields{
+ return [self fieldsOfType:BDSKStringFieldCollection];
+}
+
- (BDSKFieldCollection *)urls{
- if (templateFields == nil)
- templateFields = [[BDSKFieldCollection alloc] initWithItem:self];
- [templateFields setType:BDSKURLFieldCollection];
- return templateFields;
+ return [self fieldsOfType:BDSKURLFieldCollection];
}
- (BDSKFieldCollection *)persons{
- if (templateFields == nil)
- templateFields = [[BDSKFieldCollection alloc] initWithItem:self];
- [templateFields setType:BDSKPersonFieldCollection];
- return templateFields;
+ return [self fieldsOfType:BDSKPersonFieldCollection];
}
- (id)authors{
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