Revision: 5833
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5833&view=rev
Author:   hofman
Date:     2009-09-29 19:57:22 +0000 (Tue, 29 Sep 2009)

Log Message:
-----------
add bug fix for -[PDFBorder dashPattern] to SkimNotes framework

Modified Paths:
--------------
    trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
    trunk/SkimNotes/ReleaseNotes.rtf

Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.m       2009-09-29 17:05:31 UTC 
(rev 5832)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.m       2009-09-29 19:57:22 UTC 
(rev 5833)
@@ -89,11 +89,11 @@
 
 static id SkimNotes = nil;
 
-static IMP originalDealloc = NULL;
+static IMP original_dealloc = NULL;
 
-static void replacementDealloc(id self, SEL _cmd) {
+static void replacement_dealloc(id self, SEL _cmd) {
     [SkimNotes removeObject:self];
-    originalDealloc(self, _cmd);
+    original_dealloc(self, _cmd);
 }
 
 + (void)load {
@@ -106,16 +106,16 @@
     {
         Method deallocMethod = class_getInstanceMethod(self, 
@selector(dealloc));
 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_REQUIRED >= 
MAC_OS_X_VERSION_10_5
-        originalDealloc = method_setImplementation(deallocMethod, 
(IMP)replacementDealloc);
+        original_dealloc = method_setImplementation(deallocMethod, 
(IMP)replacement_dealloc);
 #else
 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= 
MAC_OS_X_VERSION_10_5
         if (method_setImplementation != NULL)
-            originalDealloc = method_setImplementation(deallocMethod, 
(IMP)replacementDealloc);
+            original_dealloc = method_setImplementation(deallocMethod, 
(IMP)replacement_dealloc);
         else
 #endif
         {
-            originalDealloc = deallocMethod->method_imp;
-            deallocMethod->method_imp = (IMP)replacementDealloc;
+            original_dealloc = deallocMethod->method_imp;
+            deallocMethod->method_imp = (IMP)replacement_dealloc;
             // Flush the method cache
             extern void _objc_flush_caches(Class);
             if (_objc_flush_caches != NULL)
@@ -492,3 +492,40 @@
 }
 
 @end
+
+#pragma mark -
+
+#if __LP64__
+
+// the implementation of -[PDFBorder dashPattern] is currently badly broken in 
the 64-bit binary, probably due to the wrong type for _pdfPriv.dashCount
+
+...@implementation PDFBorder (SKNExtensions)
+
+static NSArray *replacement_dashPattern(id self, SEL _cmd) {
+    NSMutableArray *pattern = [NSMutableArray array];
+    @try {
+        id vars = [self valueForKey:@"pdfPriv"];
+        NSUInteger i, count = [[vars valueForKey:@"dashCount"] 
unsignedIntegerValue];
+        Ivar ivar = object_getInstanceVariable(vars, "dashPattern", NULL);
+        if (ivar != NULL) {
+            CGFloat *dashPattern = *(CGFloat **)((void *)vars + 
ivar_getOffset(ivar));
+            for (i = 0; i < count; i++)
+                [pattern addObject:[NSNumber numberWithDouble:dashPattern[i]]];
+        }
+    }
+    @catch (id e) {}
+    return pattern;
+}
+
++ (void)load {
+    Class cls = NSClassFromString(@"PDFBorderPrivateVars");
+    if (cls) {
+        Ivar dashCountIvar = class_getInstanceVariable(cls, "dashCount");
+        if (dashCountIvar && 0 != strcmp(ivar_getTypeEncoding(dashCountIvar), 
@encode(NSUInteger)))
+            class_replaceMethod(self, @selector(dashPattern), 
(IMP)replacement_dashPattern, "@@:");
+    }
+}
+
+...@end
+
+#endif

Modified: trunk/SkimNotes/ReleaseNotes.rtf
===================================================================
--- trunk/SkimNotes/ReleaseNotes.rtf    2009-09-29 17:05:31 UTC (rev 5832)
+++ trunk/SkimNotes/ReleaseNotes.rtf    2009-09-29 19:57:22 UTC (rev 5833)
@@ -20,8 +20,9 @@
 
{\list\listtemplateid17\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker
 \{disc\}}{\leveltext\leveltemplateid1601\'01\uc0\u8226 
;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid17}
 
{\list\listtemplateid18\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker
 \{disc\}}{\leveltext\leveltemplateid1701\'01\uc0\u8226 
;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid18}
 
{\list\listtemplateid19\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker
 \{disc\}}{\leveltext\leveltemplateid1801\'01\uc0\u8226 
;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid19}
-{\list\listtemplateid20\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker
 \{disc\}}{\leveltext\leveltemplateid1901\'01\uc0\u8226 
;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid20}}
-{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}{\listoverride\listid7\listoverridecount0\ls7}{\listoverride\listid8\listoverridecount0\ls8}{\listoverride\listid9\listoverridecount0\ls9}{\listoverride\listid10\listoverridecount0\ls10}{\listoverride\listid11\listoverridecount0\ls11}{\listoverride\listid12\listoverridecount0\ls12}{\listoverride\listid13\listoverridecount0\ls13}{\listoverride\listid14\listoverridecount0\ls14}{\listoverride\listid15\listoverridecount0\ls15}{\listoverride\listid16\listoverridecount0\ls16}{\listoverride\listid17\listoverridecount0\ls17}{\listoverride\listid18\listoverridecount0\ls18}{\listoverride\listid19\listoverridecount0\ls19}{\listoverride\listid20\listoverridecount0\ls20}}
+{\list\listtemplateid20\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker
 \{disc\}}{\leveltext\leveltemplateid1901\'01\uc0\u8226 
;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid20}
+{\list\listtemplateid21\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker
 \{disc\}}{\leveltext\leveltemplateid2001\'01\uc0\u8226 
;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid21}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}{\listoverride\listid7\listoverridecount0\ls7}{\listoverride\listid8\listoverridecount0\ls8}{\listoverride\listid9\listoverridecount0\ls9}{\listoverride\listid10\listoverridecount0\ls10}{\listoverride\listid11\listoverridecount0\ls11}{\listoverride\listid12\listoverridecount0\ls12}{\listoverride\listid13\listoverridecount0\ls13}{\listoverride\listid14\listoverridecount0\ls14}{\listoverride\listid15\listoverridecount0\ls15}{\listoverride\listid16\listoverridecount0\ls16}{\listoverride\listid17\listoverridecount0\ls17}{\listoverride\listid18\listoverridecount0\ls18}{\listoverride\listid19\listoverridecount0\ls19}{\listoverride\listid20\listoverridecount0\ls20}{\listoverride\listid21\listoverridecount0\ls21}}
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 
 \f0\b\fs24 \cf0 SkimNotes Framework and Tool
@@ -39,29 +40,31 @@
 \ls2\ilvl0\cf0 {\listtext      \'95    }Support GC in frameworks for Debug and 
Release configuration\
 {\listtext     \'95    }Remove special configuration for GC\
 {\listtext     \'95    }Add conditional delegate category conformance for 
compatibility with 10.6 SDK\
+\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
+\ls3\ilvl0\cf0 {\listtext      \'95    }Fix for a 64-bit PDFKit bug\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
 
 \b Version 1.1.9
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls3\ilvl0\cf0 {\listtext      \'95    }The shared EA managers are now created 
in a thread safe manner, the instance methods were already thread safe\
+\ls4\ilvl0\cf0 {\listtext      \'95    }The shared EA managers are now created 
in a thread safe manner, the instance methods were already thread safe\
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls4\ilvl0\cf0 {\listtext      \'95    }Support 64-bit Intel for release\
+\ls5\ilvl0\cf0 {\listtext      \'95    }Support 64-bit Intel for release\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
 
 \b Version 1.1.8
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls5\ilvl0\cf0 {\listtext      \'95    }Fix reading borderstyle property\
+\ls6\ilvl0\cf0 {\listtext      \'95    }Fix reading borderstyle property\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
 
 \b Version 1.1.7
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls6\ilvl0\cf0 {\listtext      \'95    }Fix a leak in the framework\
+\ls7\ilvl0\cf0 {\listtext      \'95    }Fix a leak in the framework\
 {\listtext     \'95    }Make sure .strings files are UTF-16\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
@@ -69,7 +72,7 @@
 \b Version 1.1.6
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls7\ilvl0\cf0 {\listtext      \'95    }Don't change framework install name\
+\ls8\ilvl0\cf0 {\listtext      \'95    }Don't change framework install name\
 {\listtext     \'95    }Add traditional Chinese localization\
 {\listtext     \'95    }New option to prevent compression of  extended 
attributes data, ignored when split into fragments\
 {\listtext     \'95    }Declare error domain and codes for framework\
@@ -80,14 +83,14 @@
 \b Version 1.1.5
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls8\ilvl0\cf0 {\listtext      \'95    }Return an empty array for notes when a 
PDF bundle does not contain any notes\
+\ls9\ilvl0\cf0 {\listtext      \'95    }Return an empty array for notes when a 
PDF bundle does not contain any notes\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
 
 \b Version 1.1.4
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls9\ilvl0\cf0 {\listtext      \'95    }Update localizations\
+\ls10\ilvl0\cf0 {\listtext     \'95    }Update localizations\
 {\listtext     \'95    }Add SkimNotesBase framework to release archive\
 {\listtext     \'95    }Add support for Ink annotations\
 {\listtext     \'95    }Remove Czech localization\
@@ -97,7 +100,7 @@
 \b Version 1.1.3
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls10\ilvl0\cf0 {\listtext     \'95    }Move xcconfig files to a subfolder\
+\ls11\ilvl0\cf0 {\listtext     \'95    }Move xcconfig files to a subfolder\
 {\listtext     \'95    }Fix a leak in the framework\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
@@ -105,7 +108,7 @@
 \b Version 1.1.2
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls11\ilvl0\cf0 {\listtext     \'95    }Improvements to xcconfig files\
+\ls12\ilvl0\cf0 {\listtext     \'95    }Improvements to xcconfig files\
 {\listtext     \'95    }Functions to get default text and RTF representations 
of Skim notes\
 {\listtext     \'95    }Fix convert action in CLT\
 {\listtext     \'95    }Don't include the shared EA manager from init\
@@ -115,14 +118,14 @@
 \b Version 1.1.1
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls12\ilvl0\cf0 {\listtext     \'95    }Fix fragment attribute names\
+\ls13\ilvl0\cf0 {\listtext     \'95    }Fix fragment attribute names\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
 
 \b Version 1.1
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls13\ilvl0\cf0 {\listtext     \'95    }Consolidate API for annotation 
subclasses to a single file\
+\ls14\ilvl0\cf0 {\listtext     \'95    }Consolidate API for annotation 
subclasses to a single file\
 {\listtext     \'95    }Documentation target\
 {\listtext     \'95    }Ignore fragment attributes when getting all attribute 
names\
 {\listtext     \'95    }Return value for all attributes is now a dictionary\
@@ -145,7 +148,7 @@
 \b Version 1.0.6
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls14\ilvl0\cf0 {\listtext     \'95    }Include quadrilateral points in markup 
note properties\
+\ls15\ilvl0\cf0 {\listtext     \'95    }Include quadrilateral points in markup 
note properties\
 {\listtext     \'95    }Make sure the text in an SKNAnnotationNote is 
initialized properly\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
@@ -153,14 +156,14 @@
 \b Version 1.0.5
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls15\ilvl0\cf0 {\listtext     \'95    }Fix name prefix for extended attribute 
fragments in lookup dictionary\
+\ls16\ilvl0\cf0 {\listtext     \'95    }Fix name prefix for extended attribute 
fragments in lookup dictionary\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
 
 \b Version 1.0.4
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls16\ilvl0\cf0 {\listtext     \'95    }Fix typo in French localization\
+\ls17\ilvl0\cf0 {\listtext     \'95    }Fix typo in French localization\
 {\listtext     \'95    }Fix reading of notes from PDF bundles\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
@@ -168,14 +171,14 @@
 \b Version 1.0.3
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls17\ilvl0\cf0 {\listtext     \'95    }Return the POSIX error itself\
+\ls18\ilvl0\cf0 {\listtext     \'95    }Return the POSIX error itself\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
 
 \b Version 1.0.2
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls18\ilvl0\cf0 {\listtext     \'95    }Compress long plist data with 
non-split option\
+\ls19\ilvl0\cf0 {\listtext     \'95    }Compress long plist data with 
non-split option\
 {\listtext     \'95    }Set deployment target to 10.4 and build ppc and i386 
for Release\
 {\listtext     \'95    }Fix an info key\
 {\listtext     \'95    }Return an error when a fragment was not found\
@@ -186,7 +189,7 @@
 \b Version 1.0.1
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls19\ilvl0\cf0 {\listtext     \'95    }Avoid over-releasing of custom 
SKNExtendedAttributeManager\
+\ls20\ilvl0\cf0 {\listtext     \'95    }Avoid over-releasing of custom 
SKNExtendedAttributeManager\
 {\listtext     \'95    }Return an error when reading sSkim notes fails\
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
 \cf0 \
@@ -194,5 +197,5 @@
 \b Version 1.0
 \b0 \
 
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
-\ls20\ilvl0\cf0 {\listtext     \'95    }Initial release of SkimNotes framework 
and CLT\
+\ls21\ilvl0\cf0 {\listtext     \'95    }Initial release of SkimNotes framework 
and CLT\
 }
\ No newline at end of file


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

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to