Revision: 16511
          http://sourceforge.net/p/skim-app/code/16511
Author:   hofman
Date:     2026-09-20 21:24:29 +0000 (Sun, 20 Sep 2026)
Log Message:
-----------
declare string property as copy

Modified Paths:
--------------
    trunk/SkimNotes/PDFAnnotation_SKNExtensions.h
    trunk/SkimNotes/PDFAnnotation_SKNExtensions.m

Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.h
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.h       2026-09-20 16:09:47 UTC 
(rev 16510)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.h       2026-09-20 21:24:29 UTC 
(rev 16511)
@@ -314,7 +314,7 @@
     @discussion By default, this is just the same as the contents.  However 
for <code>SKNPDFAnnotationNote</code> the contents will contain both string and 
text.  Normally you set this by setting the <code>content</code> property.
     @result     A string representing the string value associated with the 
annotation.
 */
-@property (nonatomic, strong, nullable) NSString *string;
+@property (nonatomic, copy, nullable) NSString *string;
 
 /*!
     @abstract   Method to get the points from a path of an Ink Skim note.

Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.m       2026-09-20 16:09:47 UTC 
(rev 16510)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.m       2026-09-20 21:24:29 UTC 
(rev 16511)
@@ -985,7 +985,7 @@
             markupTypes = [[NSSet alloc] initWithObjects:SKNHighlightString, 
SKNUnderlineString, SKNStrikeOutString, SKNMarkUpString, SKNSquigglyString, 
nil];
         if ([markupTypes containsObject:[self type]]) {
             if (string)
-                [self setValue:string forAnnotationKey:@"/SkimContents"];
+                [self setValue:[string copy] 
forAnnotationKey:@"/SkimContents"];
             else
                 [self removeValueForAnnotationKey:@"/SkimContents"];
             return;
@@ -1431,7 +1431,7 @@
 #if defined(MAC_OS_X_VERSION_10_13) && MAC_OS_X_VERSION_MAX_ALLOWED >= 
MAC_OS_X_VERSION_10_13
     if (@available(macOS 27.0, iOS 27.0, *)) {
         if (string)
-            [self setValue:string forAnnotationKey:@"/SkimContents"];
+            [self setValue:[string copy] forAnnotationKey:@"/SkimContents"];
         else
             [self removeValueForAnnotationKey:@"/SkimContents"];
     } else

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to