Revision: 14835
http://sourceforge.net/p/skim-app/code/14835
Author: hofman
Date: 2024-12-15 17:32:22 +0000 (Sun, 15 Dec 2024)
Log Message:
-----------
Remove NSInvocation category
Modified Paths:
--------------
trunk/NSWindowController_SKExtensions.m
trunk/SKConversionProgressController.m
trunk/SKMainDocument.m
trunk/SKMainWindowController_UI.m
trunk/SKNoteWindowController.m
trunk/SKNotesDocument.m
trunk/Skim.xcodeproj/project.pbxproj
Removed Paths:
-------------
trunk/NSInvocation_SKExtensions.h
trunk/NSInvocation_SKExtensions.m
Deleted: trunk/NSInvocation_SKExtensions.h
===================================================================
--- trunk/NSInvocation_SKExtensions.h 2024-12-15 17:04:41 UTC (rev 14834)
+++ trunk/NSInvocation_SKExtensions.h 2024-12-15 17:32:22 UTC (rev 14835)
@@ -1,47 +0,0 @@
-//
-// NSInvocation_SKExtensions.h
-// Skim
-//
-// Created by Christiaan Hofman on 5/6/08.
-/*
- This software is Copyright (c) 2008
- Christiaan Hofman. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of Christiaan Hofman nor the names of any
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Cocoa/Cocoa.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface NSInvocation (SKExtensions)
-+ (instancetype)invocationWithTarget:(id)target selector:(SEL)selector;
-@end
-
-NS_ASSUME_NONNULL_END
Deleted: trunk/NSInvocation_SKExtensions.m
===================================================================
--- trunk/NSInvocation_SKExtensions.m 2024-12-15 17:04:41 UTC (rev 14834)
+++ trunk/NSInvocation_SKExtensions.m 2024-12-15 17:32:22 UTC (rev 14835)
@@ -1,52 +0,0 @@
-//
-// NSInvocation_SKExtensions.m
-// Skim
-//
-// Created by Christiaan Hofman on 5/6/08.
-/*
- This software is Copyright (c) 2008
- Christiaan Hofman. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of Christiaan Hofman nor the names of any
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "NSInvocation_SKExtensions.h"
-
-
-@implementation NSInvocation (SKExtensions)
-
-+ (instancetype)invocationWithTarget:(id)target selector:(SEL)selector {
- NSMethodSignature *ms = [target methodSignatureForSelector:selector];
- NSInvocation *invocation = [self invocationWithMethodSignature:ms];
- [invocation setTarget:target];
- [invocation setSelector:selector];
- return invocation;
-}
-
-@end
Modified: trunk/NSWindowController_SKExtensions.m
===================================================================
--- trunk/NSWindowController_SKExtensions.m 2024-12-15 17:04:41 UTC (rev
14834)
+++ trunk/NSWindowController_SKExtensions.m 2024-12-15 17:32:22 UTC (rev
14835)
@@ -37,7 +37,6 @@
*/
#import "NSWindowController_SKExtensions.h"
-#import "NSInvocation_SKExtensions.h"
#import "NSPointerArray_SKExtensions.h"
#import "NSPointerFunctions_SKExtensions.h"
Modified: trunk/SKConversionProgressController.m
===================================================================
--- trunk/SKConversionProgressController.m 2024-12-15 17:04:41 UTC (rev
14834)
+++ trunk/SKConversionProgressController.m 2024-12-15 17:32:22 UTC (rev
14835)
@@ -40,7 +40,6 @@
#import "NSString_SKExtensions.h"
#import "NSURL_SKExtensions.h"
#import "NSFileManager_SKExtensions.h"
-#import "NSInvocation_SKExtensions.h"
#import "SKDocumentController.h"
#import "NSDocument_SKExtensions.h"
#import "NSError_SKExtensions.h"
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2024-12-15 17:04:41 UTC (rev 14834)
+++ trunk/SKMainDocument.m 2024-12-15 17:32:22 UTC (rev 14835)
@@ -76,7 +76,6 @@
#import "SKTextFieldSheetController.h"
#import "PDFAnnotationMarkup_SKExtensions.h"
#import "NSWindowController_SKExtensions.h"
-#import "NSInvocation_SKExtensions.h"
#import "SKSyncPreferences.h"
#import "NSScreen_SKExtensions.h"
#import "NSURL_SKExtensions.h"
@@ -406,7 +405,9 @@
mdFlags.exportOption = SKExportOptionDefault;
NSInvocation *invocation = nil;
if (delegate && didSaveSelector) {
- invocation = [NSInvocation invocationWithTarget:delegate
selector:didSaveSelector];
+ invocation = [NSInvocation invocationWithMethodSignature:[delegate
methodSignatureForSelector:didSaveSelector]];
+ [invocation setTarget:delegate];
+ [invocation setSelector:didSaveSelector];
[invocation setArgument:&contextInfo atIndex:4];
}
[super runModalSavePanelForSaveOperation:saveOperation delegate:self
didSaveSelector:@selector(document:didSaveUsingPanel:contextInfo:)
contextInfo:(void *)CFBridgingRetain(invocation)];
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2024-12-15 17:04:41 UTC (rev 14834)
+++ trunk/SKMainWindowController_UI.m 2024-12-15 17:32:22 UTC (rev 14835)
@@ -75,7 +75,6 @@
#import "SKDocumentController.h"
#import "NSError_SKExtensions.h"
#import "PDFView_SKExtensions.h"
-#import "NSInvocation_SKExtensions.h"
#import "NSURL_SKExtensions.h"
#import "PDFDocument_SKExtensions.h"
#import "NSArray_SKExtensions.h"
Modified: trunk/SKNoteWindowController.m
===================================================================
--- trunk/SKNoteWindowController.m 2024-12-15 17:04:41 UTC (rev 14834)
+++ trunk/SKNoteWindowController.m 2024-12-15 17:32:22 UTC (rev 14835)
@@ -53,7 +53,6 @@
#import "NSGeometry_SKExtensions.h"
#import "NSGraphics_SKExtensions.h"
#import "SKNoteTextView.h"
-#import "NSInvocation_SKExtensions.h"
#import "NSURL_SKExtensions.h"
#import "SKMainWindowController.h"
#import "NSUserDefaults_SKExtensions.h"
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2024-12-15 17:04:41 UTC (rev 14834)
+++ trunk/SKNotesDocument.m 2024-12-15 17:32:22 UTC (rev 14835)
@@ -69,7 +69,6 @@
#import "SKTemplateManager.h"
#import "NSArray_SKExtensions.h"
#import "NSScreen_SKExtensions.h"
-#import "NSInvocation_SKExtensions.h"
#import "PDFDocument_SKExtensions.h"
#import "SKNoteTableRowView.h"
#import "NSObject_SKExtensions.h"
@@ -255,7 +254,9 @@
// Override so we can determine if this is a save, saveAs or export
operation, so we can prepare the correct accessory view
void *newContextInfo = NULL;
if (delegate && didSaveSelector) {
- NSInvocation *invocation = [NSInvocation invocationWithTarget:delegate
selector:didSaveSelector];
+ NSInvocation *invocation = [NSInvocation
invocationWithMethodSignature:[delegate
methodSignatureForSelector:didSaveSelector]];
+ [invocation setTarget:delegate];
+ [invocation setSelector:didSaveSelector];
[invocation setArgument:&contextInfo atIndex:4];
newContextInfo = (void *)CFBridgingRetain(invocation);
}
Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj 2024-12-15 17:04:41 UTC (rev
14834)
+++ trunk/Skim.xcodeproj/project.pbxproj 2024-12-15 17:32:22 UTC (rev
14835)
@@ -56,7 +56,6 @@
CE0E84D0114D516F00E37F38 /* GeneralPreferences.strings in
Resources */ = {isa = PBXBuildFile; fileRef = CE0E84CA114D516F00E37F38 /*
GeneralPreferences.strings */; };
CE0E84D1114D516F00E37F38 /* DisplayPreferences.strings in
Resources */ = {isa = PBXBuildFile; fileRef = CE0E84CC114D516F00E37F38 /*
DisplayPreferences.strings */; };
CE0E8651114DBF7000E37F38 /* SKStaticToolbarWindow.m in Sources
*/ = {isa = PBXBuildFile; fileRef = CE0E8650114DBF7000E37F38 /*
SKStaticToolbarWindow.m */; };
- CE0EB4D60DD054DC0034DF92 /* NSInvocation_SKExtensions.m in
Sources */ = {isa = PBXBuildFile; fileRef = CE0EB4D50DD054DC0034DF92 /*
NSInvocation_SKExtensions.m */; };
CE0ECCDA0DE7188C006EEDDB /* Templates in Copy Files: Shared
Support */ = {isa = PBXBuildFile; fileRef = CE0ECCD40DE71868006EEDDB /*
Templates */; };
CE0ECD1C0DE73604006EEDDB /* NSDocument_SKExtensions.m in
Sources */ = {isa = PBXBuildFile; fileRef = CE0ECD1B0DE73604006EEDDB /*
NSDocument_SKExtensions.m */; };
CE10979A161320CF00C4FA18 /* SKExportAccessoryController.m in
Sources */ = {isa = PBXBuildFile; fileRef = CE109799161320CF00C4FA18 /*
SKExportAccessoryController.m */; };
@@ -728,8 +727,6 @@
CE0E84EF114D521F00E37F38 /* zh_TW */ = {isa = PBXFileReference;
fileEncoding = 10; lastKnownFileType = text.plist.strings; name = zh_TW; path =
zh_TW.lproj/DisplayPreferences.strings; sourceTree = "<group>"; };
CE0E864F114DBF7000E37F38 /* SKStaticToolbarWindow.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SKStaticToolbarWindow.h; sourceTree = "<group>"; };
CE0E8650114DBF7000E37F38 /* SKStaticToolbarWindow.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= SKStaticToolbarWindow.m; sourceTree = "<group>"; };
- CE0EB4D40DD054DC0034DF92 /* NSInvocation_SKExtensions.h */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = NSInvocation_SKExtensions.h; sourceTree = "<group>"; };
- CE0EB4D50DD054DC0034DF92 /* NSInvocation_SKExtensions.m */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = NSInvocation_SKExtensions.m; sourceTree = "<group>";
};
CE0ECCD40DE71868006EEDDB /* Templates */ = {isa =
PBXFileReference; lastKnownFileType = folder; path = Templates; sourceTree =
"<group>"; };
CE0ECD1A0DE73604006EEDDB /* NSDocument_SKExtensions.h */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path
= NSDocument_SKExtensions.h; sourceTree = "<group>"; };
CE0ECD1B0DE73604006EEDDB /* NSDocument_SKExtensions.m */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc;
path = NSDocument_SKExtensions.m; sourceTree = "<group>"; };
@@ -1606,8 +1603,6 @@
CE5BB21510517AEF00161B87 /*
NSFileManager_SKExtensions.m */,
CE5BEA160C7C635400EBDCF7 /*
NSGeometry_SKExtensions.h */,
CE5BEA170C7C635400EBDCF7 /*
NSGeometry_SKExtensions.m */,
- CE0EB4D40DD054DC0034DF92 /*
NSInvocation_SKExtensions.h */,
- CE0EB4D50DD054DC0034DF92 /*
NSInvocation_SKExtensions.m */,
CE3401E40E01388700A7FFE6 /*
NSNumber_SKExtensions.h */,
CE3401E50E01388700A7FFE6 /*
NSNumber_SKExtensions.m */,
CEBC0DDB2791C607008686E8 /*
NSObject_SKExtensions.h */,
@@ -2921,7 +2916,6 @@
CEE176E40DBD5B0C00E6C317 /*
PDFDocumentView_SKExtensions.m in Sources */,
CECB03D30DC7503A0000B16B /*
SKGroupedSearchResult.m in Sources */,
CEEC0A0A0DCB2594003DD9B6 /*
SKMainWindowController_UI.m in Sources */,
- CE0EB4D60DD054DC0034DF92 /*
NSInvocation_SKExtensions.m in Sources */,
CE7F43910DE1F1980061A839 /*
NSUserDefaults_SKExtensions.m in Sources */,
CE0ECD1C0DE73604006EEDDB /*
NSDocument_SKExtensions.m in Sources */,
CE4642E50DF5CBD900CFD8D2 /*
PDFAnnotationText_SKExtensions.m in Sources */,
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