Revision: 29053 http://sourceforge.net/p/bibdesk/svn/29053 Author: hofman Date: 2025-02-23 15:23:04 +0000 (Sun, 23 Feb 2025) Log Message: ----------- evaluate start/end specifiers using document as container, as they often don't have a container specifier
Modified Paths: -------------- trunk/bibdesk/BibDocument+Scripting.m Modified: trunk/bibdesk/BibDocument+Scripting.m =================================================================== --- trunk/bibdesk/BibDocument+Scripting.m 2025-02-23 15:10:59 UTC (rev 29052) +++ trunk/bibdesk/BibDocument+Scripting.m 2025-02-23 15:23:04 UTC (rev 29053) @@ -742,10 +742,9 @@ // First find the index of the first start object in the groups array if (startSpec) { - id startObject = [startSpec objectsByEvaluatingSpecifier]; - if ([startObject isKindOfClass:[NSArray class]]) { - startObject = [startObject count] ? [startObject objectAtIndex:0] : nil; - } + id startObject = [startSpec objectsByEvaluatingWithContainers:self]; + if ([startObject isKindOfClass:[NSArray class]]) + startObject = [startObject firstObject]; if (startObject == nil) // Oops. We could not find the start object. return nil; @@ -761,10 +760,9 @@ // Now find the index of the last end object in the groups array if (endSpec) { - id endObject = [endSpec objectsByEvaluatingSpecifier]; - if ([endObject isKindOfClass:[NSArray class]]) { - endObject = [endObject count] ? [endObject lastObject] : nil; - } + id endObject = [endSpec objectsByEvaluatingWithContainers:self]; + if ([endObject isKindOfClass:[NSArray class]]) + endObject = [endObject lastObject]; if (endObject == nil) // Oops. We could not find the end object. return nil; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit