Revision: 28996
          http://sourceforge.net/p/bibdesk/svn/28996
Author:   hofman
Date:     2025-02-07 10:39:19 +0000 (Fri, 07 Feb 2025)
Log Message:
-----------
handle special case of 'item i of' for publication element

Modified Paths:
--------------
    trunk/bibdesk/BDSKPublicationCommand.m

Modified: trunk/bibdesk/BDSKPublicationCommand.m
===================================================================
--- trunk/bibdesk/BDSKPublicationCommand.m      2025-02-07 10:23:39 UTC (rev 
28995)
+++ trunk/bibdesk/BDSKPublicationCommand.m      2025-02-07 10:39:19 UTC (rev 
28996)
@@ -51,9 +51,14 @@
         NSScriptObjectSpecifier *containerSpecifier = [receiversSpecifier 
containerSpecifier];
         if ([[receiversSpecifier key] isEqualToString:@""] && 
[receiversSpecifier isKindOfClass:[NSIndexSpecifier class]]) {
             // this is an 'item i of <element>' specifier
-            // transform to an index specifier for the element
-            keySpecifier = [[NSIndexSpecifier alloc] 
initWithContainerClassDescription:[containerSpecifier 
containerClassDescription] containerSpecifier:nil key:[containerSpecifier key] 
index:[(NSIndexSpecifier *)receiversSpecifier index]];
-            containerSpecifier = [containerSpecifier containerSpecifier];
+            if ([[[containerSpecifier keyClassDescription] className] 
isEqualToString:@"publication"]) {
+                [super setReceiversSpecifier:receiversSpecifier];
+                return;
+            } else {
+                // transform to an index specifier for the element
+                keySpecifier = [[NSIndexSpecifier alloc] 
initWithContainerClassDescription:[containerSpecifier 
containerClassDescription] containerSpecifier:nil key:[containerSpecifier key] 
index:[(NSIndexSpecifier *)receiversSpecifier index]];
+                containerSpecifier = [containerSpecifier containerSpecifier];
+            }
         } else {
             [receiversSpecifier setContainerSpecifier:nil];
             keySpecifier = receiversSpecifier;

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

Reply via email to