Revision: 22623
          http://sourceforge.net/p/bibdesk/svn/22623
Author:   hofman
Date:     2018-09-17 09:39:43 +0000 (Mon, 17 Sep 2018)
Log Message:
-----------
Make citations in citation fields accessible to scripting

Modified Paths:
--------------
    trunk/bibdesk/BDSKField.h
    trunk/bibdesk/BDSKField.m
    trunk/bibdesk/Scripting/BibDesk.sdef

Modified: trunk/bibdesk/BDSKField.h
===================================================================
--- trunk/bibdesk/BDSKField.h   2018-09-17 09:30:15 UTC (rev 22622)
+++ trunk/bibdesk/BDSKField.h   2018-09-17 09:39:43 UTC (rev 22623)
@@ -74,4 +74,6 @@
 - (NSArray *)scriptingAuthors;
 - (BibAuthor *)valueInScriptingAuthorsWithName:(NSString *)aName;
 
+- (NSArray *)scriptingPublications;
+
 @end

Modified: trunk/bibdesk/BDSKField.m
===================================================================
--- trunk/bibdesk/BDSKField.m   2018-09-17 09:30:15 UTC (rev 22622)
+++ trunk/bibdesk/BDSKField.m   2018-09-17 09:39:43 UTC (rev 22623)
@@ -228,4 +228,8 @@
     return nil;
 }
 
+- (NSArray *)scriptingPublications {
+    return [name isCitationField] ? [bibItem citationValueOfField:name] : nil;
+}
+
 @end

Modified: trunk/bibdesk/Scripting/BibDesk.sdef
===================================================================
--- trunk/bibdesk/Scripting/BibDesk.sdef        2018-09-17 09:30:15 UTC (rev 
22622)
+++ trunk/bibdesk/Scripting/BibDesk.sdef        2018-09-17 09:39:43 UTC (rev 
22623)
@@ -1187,6 +1187,10 @@
                 description="Person values of the field.">
                 <cocoa key="scriptingAuthors"/>
             </element>
+            <element type="publication" name="publication" access="r"
+                description="Citation values of the field.">
+                <cocoa key="scriptingPublications"/>
+            </element>
         </class>
         
         <class name="info" plural="infos" code="Info"

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

Reply via email to