From c8ef9f89b8f7fc0f41b71fec9c7552683df12aaa Mon Sep 17 00:00:00 2001 From: Nate West Date: Fri, 1 Apr 2016 13:04:56 -0400 Subject: [PATCH 1/6] [#selctor] Updated swift syntax --- app/CocoaPods/CPMenuVisiblityDirector.swift | 2 +- app/CocoaPods/CPModifiedDecorationsWindow.swift | 2 +- app/CocoaPods/CPRecentDocumentSource.swift | 4 ++-- app/CocoaPods/CPSpotlightDocumentSource.swift | 6 +++--- app/CocoaPods/CPThickDecorationsWindow.swift | 2 +- app/CocoaPods/URL Handling/URLHandler.swift | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/CocoaPods/CPMenuVisiblityDirector.swift b/app/CocoaPods/CPMenuVisiblityDirector.swift index a8f8830f..a8315b69 100644 --- a/app/CocoaPods/CPMenuVisiblityDirector.swift +++ b/app/CocoaPods/CPMenuVisiblityDirector.swift @@ -18,7 +18,7 @@ class CPMenuVisiblityDirector: NSObject { override func awakeFromNib() { let notificationCenter = NSNotificationCenter.defaultCenter() - notificationCenter.addObserver(self, selector: "windowsChanged:", name: NSWindowDidBecomeKeyNotification, object: nil) + notificationCenter.addObserver(self, selector: #selector(windowsChanged(_:)), name: NSWindowDidBecomeKeyNotification, object: nil) } /// Set hidden on the menus when we don't need to show the submenus diff --git a/app/CocoaPods/CPModifiedDecorationsWindow.swift b/app/CocoaPods/CPModifiedDecorationsWindow.swift index 00a577a1..cfcadfbd 100644 --- a/app/CocoaPods/CPModifiedDecorationsWindow.swift +++ b/app/CocoaPods/CPModifiedDecorationsWindow.swift @@ -23,7 +23,7 @@ class CPModifiedDecorationsWindow: NSWindow { super.makeKeyAndOrderFront(sender) [NSWindowDidResizeNotification, NSWindowDidResizeNotification, NSWindowDidMoveNotification].forEach { notification in - NSNotificationCenter.defaultCenter().addObserver(self, selector: "moveWindowButtons", name: notification, object: self) + NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(moveWindowButtons), name: notification, object: self) } moveWindowButtons() } diff --git a/app/CocoaPods/CPRecentDocumentSource.swift b/app/CocoaPods/CPRecentDocumentSource.swift index c8b17127..6fcf1d76 100644 --- a/app/CocoaPods/CPRecentDocumentSource.swift +++ b/app/CocoaPods/CPRecentDocumentSource.swift @@ -16,8 +16,8 @@ class CPRecentDocumentSource: CPDocumentSource { super.init() let notificationCenter = NSNotificationCenter.defaultCenter() - notificationCenter.addObserver(self, selector: "updateRecentDocuments:", name: CPDocumentController.ClearRecentDocumentsNotification, object: nil) - notificationCenter.addObserver(self, selector: "updateRecentDocuments:", name: CPDocumentController.RecentDocumentUpdateNotification, object: nil) + notificationCenter.addObserver(self, selector: #selector(updateRecentDocuments(_:)), name: CPDocumentController.ClearRecentDocumentsNotification, object: nil) + notificationCenter.addObserver(self, selector: #selector(updateRecentDocuments(_:)), name: CPDocumentController.RecentDocumentUpdateNotification, object: nil) } deinit { diff --git a/app/CocoaPods/CPSpotlightDocumentSource.swift b/app/CocoaPods/CPSpotlightDocumentSource.swift index eac0092f..d607d23c 100644 --- a/app/CocoaPods/CPSpotlightDocumentSource.swift +++ b/app/CocoaPods/CPSpotlightDocumentSource.swift @@ -17,8 +17,8 @@ class CPSpotlightDocumentSource: CPDocumentSource { func start() { let notificationCenter = NSNotificationCenter.defaultCenter() - notificationCenter.addObserver(self, selector: "queryUpdated:", name: NSMetadataQueryDidUpdateNotification, object: self.query) - notificationCenter.addObserver(self, selector: "queryGatheringFinished:", name: NSMetadataQueryDidFinishGatheringNotification, object: self.query) + notificationCenter.addObserver(self, selector: #selector(queryUpdated(_:)), name: NSMetadataQueryDidUpdateNotification, object: self.query) + notificationCenter.addObserver(self, selector: #selector(queryGatheringFinished(_:)), name: NSMetadataQueryDidFinishGatheringNotification, object: self.query) query.predicate = NSPredicate(format: "kMDItemFSName == 'Podfile'", argumentArray: nil) query.sortDescriptors = [NSSortDescriptor(key: kMDItemContentModificationDate as String, ascending: true)] @@ -41,7 +41,7 @@ class CPSpotlightDocumentSource: CPDocumentSource { query.enableUpdates() - NSObject.cancelPreviousPerformRequestsWithTarget(self, selector: Selector("queryFinished"), object: nil) + NSObject.cancelPreviousPerformRequestsWithTarget(self, selector: #selector(queryFinished), object: nil) queryFinished() } diff --git a/app/CocoaPods/CPThickDecorationsWindow.swift b/app/CocoaPods/CPThickDecorationsWindow.swift index 19b9dd19..eb30ee97 100644 --- a/app/CocoaPods/CPThickDecorationsWindow.swift +++ b/app/CocoaPods/CPThickDecorationsWindow.swift @@ -15,7 +15,7 @@ class CPThickDecorationsWindow: NSWindow { super.makeKeyAndOrderFront(sender) [NSWindowDidResizeNotification, NSWindowDidResizeNotification, NSWindowDidMoveNotification].forEach { notification in - NSNotificationCenter.defaultCenter().addObserver(self, selector: "moveWindowButtons", name: notification, object: self) + NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(moveWindowButtons), name: notification, object: self) } moveWindowButtons() } diff --git a/app/CocoaPods/URL Handling/URLHandler.swift b/app/CocoaPods/URL Handling/URLHandler.swift index 73aa7c1e..5d8c5e6b 100644 --- a/app/CocoaPods/URL Handling/URLHandler.swift +++ b/app/CocoaPods/URL Handling/URLHandler.swift @@ -12,7 +12,7 @@ class URLHandler: NSObject { let manager = NSAppleEventManager.sharedAppleEventManager() manager.setEventHandler( self, - andSelector: "handleEvent:withReply:", + andSelector: #selector(handleEvent(_:withReply:)), forEventClass: eventClass, andEventID: eventId ) From 8ab0932e6444b05660eb5cdfd7ecc3b9efcdb52a Mon Sep 17 00:00:00 2001 From: Nate West Date: Fri, 1 Apr 2016 13:07:55 -0400 Subject: [PATCH 2/6] [Nibs] Update nibs with Xcode7.3 metadata --- app/CocoaPods/Base.lproj/CPHomeWindowController.xib | 8 ++++---- app/CocoaPods/Podfile.storyboard | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/CocoaPods/Base.lproj/CPHomeWindowController.xib b/app/CocoaPods/Base.lproj/CPHomeWindowController.xib index 285d3404..c8cfdfe8 100644 --- a/app/CocoaPods/Base.lproj/CPHomeWindowController.xib +++ b/app/CocoaPods/Base.lproj/CPHomeWindowController.xib @@ -1,7 +1,7 @@ - + - + @@ -50,8 +50,8 @@ -