Revision: 22281 http://sourceforge.net/p/bibdesk/svn/22281 Author: hofman Date: 2018-06-01 21:32:16 +0000 (Fri, 01 Jun 2018) Log Message: ----------- add scripting support for integer value of a field
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-06-01 20:50:21 UTC (rev 22280) +++ trunk/bibdesk/BDSKField.h 2018-06-01 21:32:16 UTC (rev 22281) @@ -56,6 +56,8 @@ - (NSString *)bibTeXString; - (void)setBibTeXString:(NSString *)newValue; +- (NSInteger)integerValue; + - (BOOL)isInherited; @end Modified: trunk/bibdesk/BDSKField.m =================================================================== --- trunk/bibdesk/BDSKField.m 2018-06-01 20:50:21 UTC (rev 22280) +++ trunk/bibdesk/BDSKField.m 2018-06-01 21:32:16 UTC (rev 22281) @@ -123,6 +123,10 @@ } } +- (NSInteger)integerValue { + return [bibItem integerValueOfField:name]; +} + - (BOOL)isInherited { return [[bibItem valueOfField:name] isInherited]; } Modified: trunk/bibdesk/Scripting/BibDesk.sdef =================================================================== --- trunk/bibdesk/Scripting/BibDesk.sdef 2018-06-01 20:50:21 UTC (rev 22280) +++ trunk/bibdesk/Scripting/BibDesk.sdef 2018-06-01 21:32:16 UTC (rev 22281) @@ -1157,6 +1157,10 @@ description="The value of the field as raw BibTeX"> <cocoa key="bibTeXString"/> </property> + <property name="integer value" code="Intv" type="integer" access="r" + description="The integer value of the field"> + <cocoa key="integerValue"/> + </property> <property name="inherited" code="Inhe" type="boolean" description="Whether the value of the field is inherited (crossreffed)"> <cocoa key="isInherited"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit