Revision: 3661
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3661&view=rev
Author:   hofman
Date:     2008-04-07 02:46:16 -0700 (Mon, 07 Apr 2008)

Log Message:
-----------
Allow setters for read-only scripting keys to be used for the make command.

Modified Paths:
--------------
    trunk/PDFAnnotation_SKExtensions.m
    trunk/SKPDFAnnotationMarkup.m

Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m  2008-04-06 23:44:21 UTC (rev 3660)
+++ trunk/PDFAnnotation_SKExtensions.m  2008-04-07 09:46:16 UTC (rev 3661)
@@ -447,6 +447,12 @@
     return 0;
 }
 
+- (void)setScriptingNoteType:(unsigned long)type {
+    NSScriptCommand *currentCommand = [NSScriptCommand currentCommand];
+    if ([currentCommand isKindOfClass:[NSCreateCommand class]] == NO)
+        [currentCommand 
setScriptErrorNumber:NSReceiversCantHandleCommandScriptError]; 
+}
+
 - (unsigned long)scriptingIconType {
     return SKScriptingTextAnnotationIconNote;
 }
@@ -527,8 +533,6 @@
     return [NSNull null];
 }
 
-- (void)setSelectionSpecifier:(id)specifier {}
-
 @end
 
 #pragma mark -
@@ -541,21 +545,14 @@
 // override these Leopard methods to avoid showing the standard tool tips over 
our own
 
 static IMP originalToolTip = NULL;
-static IMP originalToolTipNoLabel = NULL;
 
 - (NSString *)replacementToolTip {
     return ([self URL] || [self destination] || originalToolTip == NULL) ? nil 
: originalToolTip(self, _cmd);
 }
 
-- (NSString *)replacementToolTipNoLabel {
-    return ([self URL] || [self destination] || originalToolTipNoLabel == 
NULL) ? nil : originalToolTipNoLabel(self, _cmd);
-}
-
 + (void)load {
     if ([self instancesRespondToSelector:@selector(toolTip)])
         originalToolTip = OBReplaceMethodImplementationWithSelector(self, 
@selector(toolTip), @selector(replacementToolTip));
-    if ([self instancesRespondToSelector:@selector(toolTipNoLabel)])
-        originalToolTip = OBReplaceMethodImplementationWithSelector(self, 
@selector(toolTipNoLabel), @selector(replacementToolTipNoLabel));
 }
 
 @end

Modified: trunk/SKPDFAnnotationMarkup.m
===================================================================
--- trunk/SKPDFAnnotationMarkup.m       2008-04-06 23:44:21 UTC (rev 3660)
+++ trunk/SKPDFAnnotationMarkup.m       2008-04-07 09:46:16 UTC (rev 3661)
@@ -412,6 +412,12 @@
     return sel ? [sel objectSpecifier] : [NSArray array];
 }
 
+- (void)setSelectionSpecifier:(id)specifier {
+    NSScriptCommand *currentCommand = [NSScriptCommand currentCommand];
+    if ([currentCommand isKindOfClass:[NSCreateCommand class]] == NO)
+        [currentCommand 
setScriptErrorNumber:NSReceiversCantHandleCommandScriptError]; 
+}
+
 @end
 
 #pragma mark -


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

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to