Revision: 5932
http://skim-app.svn.sourceforge.net/skim-app/?rev=5932&view=rev
Author: hofman
Date: 2009-10-22 15:09:41 +0000 (Thu, 22 Oct 2009)
Log Message:
-----------
we can now safely return nil from scripting accessors
Modified Paths:
--------------
trunk/PDFAnnotation_SKExtensions.m
trunk/SKMainDocument.m
Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m 2009-10-22 13:03:54 UTC (rev 5931)
+++ trunk/PDFAnnotation_SKExtensions.m 2009-10-22 15:09:41 UTC (rev 5932)
@@ -302,7 +302,7 @@
}
- (id)richText {
- return [NSNull null];
+ return nil;
}
- (void)setBoundsAsQDRect:(NSData *)inQDBoundsAsData {
@@ -326,7 +326,7 @@
}
- (NSString *)fontName {
- return (id)[NSNull null];
+ return nil;
}
- (CGFloat)fontSize {
@@ -334,7 +334,7 @@
}
- (NSColor *)scriptingFontColor {
- return (id)[NSNull null];
+ return nil;
}
- (FourCharCode)scriptingBorderStyle {
@@ -346,11 +346,11 @@
}
- (NSData *)startPointAsQDPoint {
- return (id)[NSNull null];
+ return nil;
}
- (NSData *)endPointAsQDPoint {
- return (id)[NSNull null];
+ return nil;
}
- (FourCharCode)scriptingStartLineStyle {
@@ -362,11 +362,11 @@
}
- (id)selectionSpecifier {
- return [NSNull null];
+ return nil;
}
- (NSArray *)scriptingPointLists {
- return (id)[NSNull null];
+ return nil;
}
#pragma mark Accessibility
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2009-10-22 13:03:54 UTC (rev 5931)
+++ trunk/SKMainDocument.m 2009-10-22 15:09:41 UTC (rev 5932)
@@ -1890,7 +1890,7 @@
- (id)activeNote {
id note = [[self pdfView] activeAnnotation];
- return [note isSkimNote] ? note : [NSNull null];
+ return note;
}
- (void)setActiveNote:(id)note {
@@ -1940,8 +1940,7 @@
}
- (id)selectionPage {
- PDFPage *page = [[self pdfView] currentSelectionPage];
- return (id)page ?: (id)[NSNull null];
+ return [[self pdfView] currentSelectionPage];
}
- (void)setSelectionPage:(PDFPage *)page {
@@ -2178,7 +2177,7 @@
- (id)replacement_document {
id document = original_document(self, _cmd);
- return [[NSApp orderedDocuments] containsObject:document] ? document :
[NSNull null];
+ return [[NSApp orderedDocuments] containsObject:document] ? document : nil;
}
+ (void)load {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit