Break the build. Switching to submodules. Delete local copy of RSCore.
This commit is contained in:
parent
a1374d5420
commit
993d584731
@ -111,8 +111,6 @@
|
||||
84AD1EAA2031617300BC20B7 /* FolderPasteboardWriter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AD1EA92031617300BC20B7 /* FolderPasteboardWriter.swift */; };
|
||||
84AD1EBA2031649C00BC20B7 /* SmartFeedPasteboardWriter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AD1EB92031649C00BC20B7 /* SmartFeedPasteboardWriter.swift */; };
|
||||
84AD1EBC2032AF5C00BC20B7 /* SidebarOutlineDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AD1EBB2032AF5C00BC20B7 /* SidebarOutlineDataSource.swift */; };
|
||||
84B06FAE1ED37DBD00F0B54B /* RSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B06FA91ED37DAD00F0B54B /* RSCore.framework */; };
|
||||
84B06FAF1ED37DBD00F0B54B /* RSCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 84B06FA91ED37DAD00F0B54B /* RSCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
84B06FB21ED37DBD00F0B54B /* RSDatabase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B06F9D1ED37DA000F0B54B /* RSDatabase.framework */; };
|
||||
84B06FB31ED37DBD00F0B54B /* RSDatabase.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 84B06F9D1ED37DA000F0B54B /* RSDatabase.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
84B06FC21ED37E9600F0B54B /* RSWeb.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B06FBD1ED37E8C00F0B54B /* RSWeb.framework */; };
|
||||
@ -308,34 +306,6 @@
|
||||
remoteGlobalIDString = 8400ABF71E0CFBD800AA7C57;
|
||||
remoteInfo = RSDatabaseiOS;
|
||||
};
|
||||
84B06FA81ED37DAD00F0B54B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 84B06FA21ED37DAC00F0B54B /* RSCore.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 84CFF4F41AC3C69700CEA6C8;
|
||||
remoteInfo = RSCore;
|
||||
};
|
||||
84B06FAA1ED37DAD00F0B54B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 84B06FA21ED37DAC00F0B54B /* RSCore.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 84CFF4FF1AC3C69700CEA6C8;
|
||||
remoteInfo = RSCoreTests;
|
||||
};
|
||||
84B06FAC1ED37DAD00F0B54B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 84B06FA21ED37DAC00F0B54B /* RSCore.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 842DD7BC1E14993900E061EB;
|
||||
remoteInfo = RSCoreiOS;
|
||||
};
|
||||
84B06FB01ED37DBD00F0B54B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 84B06FA21ED37DAC00F0B54B /* RSCore.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 84CFF4F31AC3C69700CEA6C8;
|
||||
remoteInfo = RSCore;
|
||||
};
|
||||
84B06FB41ED37DBD00F0B54B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 84B06F961ED37DA000F0B54B /* RSDatabase.xcodeproj */;
|
||||
@ -471,7 +441,6 @@
|
||||
84B06FB31ED37DBD00F0B54B /* RSDatabase.framework in Embed Frameworks */,
|
||||
84B06FEA1ED3803A00F0B54B /* RSFeedFinder.framework in Embed Frameworks */,
|
||||
84B06FFE1ED3818D00F0B54B /* RSTree.framework in Embed Frameworks */,
|
||||
84B06FAF1ED37DBD00F0B54B /* RSCore.framework in Embed Frameworks */,
|
||||
846E773E1F6EF67A00A165E2 /* Account.framework in Embed Frameworks */,
|
||||
84B06FD01ED37F7D00F0B54B /* DB5.framework in Embed Frameworks */,
|
||||
84B06FC31ED37E9600F0B54B /* RSWeb.framework in Embed Frameworks */,
|
||||
@ -624,7 +593,6 @@
|
||||
84AD1EB92031649C00BC20B7 /* SmartFeedPasteboardWriter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmartFeedPasteboardWriter.swift; sourceTree = "<group>"; };
|
||||
84AD1EBB2032AF5C00BC20B7 /* SidebarOutlineDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarOutlineDataSource.swift; sourceTree = "<group>"; };
|
||||
84B06F961ED37DA000F0B54B /* RSDatabase.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RSDatabase.xcodeproj; path = Frameworks/RSDatabase/RSDatabase.xcodeproj; sourceTree = "<group>"; };
|
||||
84B06FA21ED37DAC00F0B54B /* RSCore.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RSCore.xcodeproj; path = Frameworks/RSCore/RSCore.xcodeproj; sourceTree = "<group>"; };
|
||||
84B06FB61ED37E8B00F0B54B /* RSWeb.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RSWeb.xcodeproj; path = Frameworks/RSWeb/RSWeb.xcodeproj; sourceTree = "<group>"; };
|
||||
84B06FC61ED37F7200F0B54B /* DB5.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = DB5.xcodeproj; path = Frameworks/DB5/DB5.xcodeproj; sourceTree = "<group>"; };
|
||||
84B06FE01ED3803200F0B54B /* RSFeedFinder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RSFeedFinder.xcodeproj; path = Frameworks/RSFeedFinder/RSFeedFinder.xcodeproj; sourceTree = "<group>"; };
|
||||
@ -731,7 +699,6 @@
|
||||
846E77411F6EF6A100A165E2 /* Database.framework in Frameworks */,
|
||||
84B06FE91ED3803A00F0B54B /* RSFeedFinder.framework in Frameworks */,
|
||||
84B06FFD1ED3818D00F0B54B /* RSTree.framework in Frameworks */,
|
||||
84B06FAE1ED37DBD00F0B54B /* RSCore.framework in Frameworks */,
|
||||
84B06FCF1ED37F7D00F0B54B /* DB5.framework in Frameworks */,
|
||||
846E773D1F6EF67A00A165E2 /* Account.framework in Frameworks */,
|
||||
84FB9A2F1EDCD6C4003D53B9 /* Sparkle.framework in Frameworks */,
|
||||
@ -1128,7 +1095,6 @@
|
||||
846E77161F6EF5D000A165E2 /* Database.xcodeproj */,
|
||||
84BB4B611F1174D400858766 /* Data.xcodeproj */,
|
||||
84B06FC61ED37F7200F0B54B /* DB5.xcodeproj */,
|
||||
84B06FA21ED37DAC00F0B54B /* RSCore.xcodeproj */,
|
||||
84B06F961ED37DA000F0B54B /* RSDatabase.xcodeproj */,
|
||||
84B06FE01ED3803200F0B54B /* RSFeedFinder.xcodeproj */,
|
||||
849B89681F0349C100578A8D /* RSParser.xcodeproj */,
|
||||
@ -1188,16 +1154,6 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
84B06FA31ED37DAC00F0B54B /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84B06FA91ED37DAD00F0B54B /* RSCore.framework */,
|
||||
84B06FAB1ED37DAD00F0B54B /* RSCoreTests.xctest */,
|
||||
84B06FAD1ED37DAD00F0B54B /* RSCore.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
84B06FB71ED37E8B00F0B54B /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -1453,7 +1409,6 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
84B06FB11ED37DBD00F0B54B /* PBXTargetDependency */,
|
||||
84B06FB51ED37DBD00F0B54B /* PBXTargetDependency */,
|
||||
84B06FC51ED37E9600F0B54B /* PBXTargetDependency */,
|
||||
84B06FD21ED37F7D00F0B54B /* PBXTargetDependency */,
|
||||
@ -1556,10 +1511,6 @@
|
||||
ProductGroup = 84B06FC71ED37F7200F0B54B /* Products */;
|
||||
ProjectRef = 84B06FC61ED37F7200F0B54B /* DB5.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 84B06FA31ED37DAC00F0B54B /* Products */;
|
||||
ProjectRef = 84B06FA21ED37DAC00F0B54B /* RSCore.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 84B06F971ED37DA000F0B54B /* Products */;
|
||||
ProjectRef = 84B06F961ED37DA000F0B54B /* RSDatabase.xcodeproj */;
|
||||
@ -1656,27 +1607,6 @@
|
||||
remoteRef = 84B06FA01ED37DA000F0B54B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
84B06FA91ED37DAD00F0B54B /* RSCore.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = RSCore.framework;
|
||||
remoteRef = 84B06FA81ED37DAD00F0B54B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
84B06FAB1ED37DAD00F0B54B /* RSCoreTests.xctest */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.cfbundle;
|
||||
path = RSCoreTests.xctest;
|
||||
remoteRef = 84B06FAA1ED37DAD00F0B54B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
84B06FAD1ED37DAD00F0B54B /* RSCore.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = RSCore.framework;
|
||||
remoteRef = 84B06FAC1ED37DAD00F0B54B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
84B06FBD1ED37E8C00F0B54B /* RSWeb.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
@ -2035,11 +1965,6 @@
|
||||
target = 849C645F1ED37A5D003D8FC0 /* Evergreen */;
|
||||
targetProxy = 849C64721ED37A5D003D8FC0 /* PBXContainerItemProxy */;
|
||||
};
|
||||
84B06FB11ED37DBD00F0B54B /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = RSCore;
|
||||
targetProxy = 84B06FB01ED37DBD00F0B54B /* PBXContainerItemProxy */;
|
||||
};
|
||||
84B06FB51ED37DBD00F0B54B /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = RSDatabase;
|
||||
|
60
Frameworks/RSCore/.gitignore
vendored
60
Frameworks/RSCore/.gitignore
vendored
@ -1,60 +0,0 @@
|
||||
# Xcode
|
||||
#
|
||||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
|
||||
|
||||
## Build generated
|
||||
build/
|
||||
DerivedData/
|
||||
|
||||
## Various settings
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata/
|
||||
|
||||
## Other
|
||||
*.moved-aside
|
||||
*.xcuserstate
|
||||
|
||||
## Obj-C/Swift specific
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.dSYM.zip
|
||||
*.dSYM
|
||||
|
||||
# CocoaPods
|
||||
#
|
||||
# We recommend against adding the Pods directory to your .gitignore. However
|
||||
# you should judge for yourself, the pros and cons are mentioned at:
|
||||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
||||
#
|
||||
# Pods/
|
||||
|
||||
# Carthage
|
||||
#
|
||||
# Add this line if you want to avoid checking in source code from Carthage dependencies.
|
||||
# Carthage/Checkouts
|
||||
|
||||
Carthage/Build
|
||||
|
||||
# fastlane
|
||||
#
|
||||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
||||
# screenshots whenever they are needed.
|
||||
# For more information about the recommended setup visit:
|
||||
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
|
||||
|
||||
fastlane/report.xml
|
||||
fastlane/screenshots
|
||||
|
||||
#Code Injection
|
||||
#
|
||||
# After new code Injection tools there's a generated folder /iOSInjectionProject
|
||||
# https://github.com/johnno1962/injectionforxcode
|
||||
|
||||
iOSInjectionProject/
|
@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 brentsimmons
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -1,8 +0,0 @@
|
||||
# RSCore
|
||||
Utility code for Mac and iOS apps.
|
||||
|
||||
This builds a Mac framework and an iOS framework.
|
||||
|
||||
There’s a whole bunch of stuff in here. There are categories on Foundation and AppKit objects plus a few miscellaneous things.
|
||||
|
||||
(More notes will be coming.)
|
@ -1,974 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8402047E1FBCE77900D94C1A /* BatchUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8402047D1FBCE77900D94C1A /* BatchUpdate.swift */; };
|
||||
8402047F1FBCE77900D94C1A /* BatchUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8402047D1FBCE77900D94C1A /* BatchUpdate.swift */; };
|
||||
84134D1F1C59D5450063FD24 /* NSCalendar+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84134D1D1C59D5450063FD24 /* NSCalendar+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84134D201C59D5450063FD24 /* NSCalendar+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84134D1E1C59D5450063FD24 /* NSCalendar+RSCore.m */; };
|
||||
8414CBA71C95F2EA00333C12 /* Set+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8414CBA61C95F2EA00333C12 /* Set+Extensions.swift */; };
|
||||
8414CBAB1C95F8F700333C12 /* RSGeometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 8414CBA91C95F8F700333C12 /* RSGeometry.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
8414CBAC1C95F8F700333C12 /* RSGeometry.m in Sources */ = {isa = PBXBuildFile; fileRef = 8414CBAA1C95F8F700333C12 /* RSGeometry.m */; };
|
||||
8415CB8A1BF84D24007B1E98 /* NSEvent+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 8415CB881BF84D24007B1E98 /* NSEvent+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
8415CB8B1BF84D24007B1E98 /* NSEvent+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 8415CB891BF84D24007B1E98 /* NSEvent+RSCore.m */; };
|
||||
8417FE021AC67D430048E9B7 /* RSOpaqueContainerView.h in Headers */ = {isa = PBXBuildFile; fileRef = 8417FE001AC67D430048E9B7 /* RSOpaqueContainerView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
8417FE031AC67D430048E9B7 /* RSOpaqueContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8417FE011AC67D430048E9B7 /* RSOpaqueContainerView.m */; };
|
||||
842635571D7FA1C800196285 /* NSTableView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842635561D7FA1C800196285 /* NSTableView+Extensions.swift */; };
|
||||
842635591D7FA24800196285 /* NSOutlineView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842635581D7FA24800196285 /* NSOutlineView+Extensions.swift */; };
|
||||
842DD7C41E14995000E061EB /* RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF4F91AC3C69700CEA6C8 /* RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7C51E14995C00E061EB /* RSBlocks.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5101AC3C6D800CEA6C8 /* RSBlocks.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7C61E14995C00E061EB /* RSBlocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5111AC3C6D800CEA6C8 /* RSBlocks.m */; };
|
||||
842DD7C71E14995C00E061EB /* RSConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5141AC3C73000CEA6C8 /* RSConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7C81E14995C00E061EB /* RSConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5151AC3C73000CEA6C8 /* RSConstants.m */; };
|
||||
842DD7C91E14995C00E061EB /* RSPlatform.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5181AC3C77500CEA6C8 /* RSPlatform.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7CA1E14995C00E061EB /* RSPlatform.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5191AC3C77500CEA6C8 /* RSPlatform.m */; };
|
||||
842DD7CD1E14995C00E061EB /* RSPlist.h in Headers */ = {isa = PBXBuildFile; fileRef = 844C91591B65753E0051FC1B /* RSPlist.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7CE1E14995C00E061EB /* RSPlist.m in Sources */ = {isa = PBXBuildFile; fileRef = 844C915A1B65753E0051FC1B /* RSPlist.m */; };
|
||||
842DD7CF1E14995C00E061EB /* RSMacroProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 8453F7DC1BDF337800B1C8ED /* RSMacroProcessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7D01E14995C00E061EB /* RSMacroProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 8453F7DD1BDF337800B1C8ED /* RSMacroProcessor.m */; };
|
||||
842DD7D51E14995C00E061EB /* PlistProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A835891D4EC7B80004C598 /* PlistProviderProtocol.swift */; };
|
||||
842DD7D61E14996300E061EB /* NSArray+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5251AC3C9A200CEA6C8 /* NSArray+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7D71E14996300E061EB /* NSArray+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5261AC3C9A200CEA6C8 /* NSArray+RSCore.m */; };
|
||||
842DD7D81E14996300E061EB /* NSCalendar+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84134D1D1C59D5450063FD24 /* NSCalendar+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7D91E14996300E061EB /* NSCalendar+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84134D1E1C59D5450063FD24 /* NSCalendar+RSCore.m */; };
|
||||
842DD7DA1E14996300E061EB /* NSData+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5291AC3CA9700CEA6C8 /* NSData+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7DB1E14996300E061EB /* NSData+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF52A1AC3CA9700CEA6C8 /* NSData+RSCore.m */; };
|
||||
842DD7DC1E14996300E061EB /* NSDate+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF52D1AC3CB1900CEA6C8 /* NSDate+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7DD1E14996300E061EB /* NSDate+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF52E1AC3CB1900CEA6C8 /* NSDate+RSCore.m */; };
|
||||
842DD7DE1E14996300E061EB /* NSDictionary+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5311AC3CB6800CEA6C8 /* NSDictionary+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7DF1E14996300E061EB /* NSDictionary+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5321AC3CB6800CEA6C8 /* NSDictionary+RSCore.m */; };
|
||||
842DD7E01E14996300E061EB /* NSFileManager+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84536F641BB856D4001E1639 /* NSFileManager+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7E11E14996300E061EB /* NSFileManager+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84536F651BB856D4001E1639 /* NSFileManager+RSCore.m */; };
|
||||
842DD7E21E14996300E061EB /* NSMutableArray+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5351AC3CBB200CEA6C8 /* NSMutableArray+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7E31E14996300E061EB /* NSMutableArray+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5361AC3CBB200CEA6C8 /* NSMutableArray+RSCore.m */; };
|
||||
842DD7E41E14996300E061EB /* NSMutableDictionary+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5391AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7E51E14996300E061EB /* NSMutableDictionary+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF53A1AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.m */; };
|
||||
842DD7E61E14996300E061EB /* NSMutableSet+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF53D1AC3CD0100CEA6C8 /* NSMutableSet+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7E71E14996300E061EB /* NSMutableSet+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF53E1AC3CD0100CEA6C8 /* NSMutableSet+RSCore.m */; };
|
||||
842DD7E81E14996300E061EB /* NSNotificationCenter+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5411AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7E91E14996300E061EB /* NSNotificationCenter+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5421AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.m */; };
|
||||
842DD7EA1E14996300E061EB /* NSObject+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5201AC3C89D00CEA6C8 /* NSObject+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7EB1E14996300E061EB /* NSObject+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5211AC3C89D00CEA6C8 /* NSObject+RSCore.m */; };
|
||||
842DD7EC1E14996300E061EB /* NSSet+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 845DE0F11B80477100D1571B /* NSSet+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7ED1E14996300E061EB /* NSSet+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 845DE0F21B80477100D1571B /* NSSet+RSCore.m */; };
|
||||
842DD7EE1E14996300E061EB /* NSString+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5491AC3CDAC00CEA6C8 /* NSString+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7EF1E14996300E061EB /* NSString+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF54A1AC3CDAC00CEA6C8 /* NSString+RSCore.m */; };
|
||||
842DD7F01E14996300E061EB /* NSTimer+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5451AC3CD8000CEA6C8 /* NSTimer+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7F11E14996300E061EB /* NSTimer+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5461AC3CD8000CEA6C8 /* NSTimer+RSCore.m */; };
|
||||
842DD7F21E14996B00E061EB /* Date+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84FEB4AB1D19D7F4004727E5 /* Date+Extensions.swift */; };
|
||||
842DD7F31E14996B00E061EB /* NSMutableDictionary-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BB45421D6909C700B48537 /* NSMutableDictionary-Extensions.swift */; };
|
||||
842DD7F41E14996B00E061EB /* Set+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8414CBA61C95F2EA00333C12 /* Set+Extensions.swift */; };
|
||||
842DD7F51E14997600E061EB /* RSImageRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5621AC3D13C00CEA6C8 /* RSImageRenderer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7F61E14997600E061EB /* RSImageRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5631AC3D13C00CEA6C8 /* RSImageRenderer.m */; };
|
||||
842DD7F71E14997600E061EB /* RSScaling.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5671AC3D1B000CEA6C8 /* RSScaling.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
842DD7F81E14997600E061EB /* RSScaling.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5681AC3D1B000CEA6C8 /* RSScaling.m */; };
|
||||
842E45CC1ED623C7000A8B52 /* UniqueIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842E45CB1ED623C7000A8B52 /* UniqueIdentifier.swift */; };
|
||||
8432B1861DACA0E90057D6DF /* NSResponder-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8432B1851DACA0E90057D6DF /* NSResponder-Extensions.swift */; };
|
||||
8432B1881DACA2060057D6DF /* NSWindow-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8432B1871DACA2060057D6DF /* NSWindow-Extensions.swift */; };
|
||||
8434D15C200BD6F400D6281E /* UserApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8434D15B200BD6F400D6281E /* UserApp.swift */; };
|
||||
84411E731FE5FFC3004B527F /* NSImage+RSCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84411E721FE5FFC3004B527F /* NSImage+RSCore.swift */; };
|
||||
844B5B571FE9D36000C7C76A /* Keyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844B5B561FE9D36000C7C76A /* Keyboard.swift */; };
|
||||
844C915B1B65753E0051FC1B /* RSPlist.h in Headers */ = {isa = PBXBuildFile; fileRef = 844C91591B65753E0051FC1B /* RSPlist.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
844C915C1B65753E0051FC1B /* RSPlist.m in Sources */ = {isa = PBXBuildFile; fileRef = 844C915A1B65753E0051FC1B /* RSPlist.m */; };
|
||||
844F91D51D90D86100820C48 /* RSTransparentContainerView.h in Headers */ = {isa = PBXBuildFile; fileRef = 844F91D31D90D86100820C48 /* RSTransparentContainerView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
844F91D61D90D86100820C48 /* RSTransparentContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 844F91D41D90D86100820C48 /* RSTransparentContainerView.m */; };
|
||||
84536F661BB856D4001E1639 /* NSFileManager+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84536F641BB856D4001E1639 /* NSFileManager+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84536F671BB856D4001E1639 /* NSFileManager+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84536F651BB856D4001E1639 /* NSFileManager+RSCore.m */; };
|
||||
8453F7DE1BDF337800B1C8ED /* RSMacroProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 8453F7DC1BDF337800B1C8ED /* RSMacroProcessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
8453F7DF1BDF337800B1C8ED /* RSMacroProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 8453F7DD1BDF337800B1C8ED /* RSMacroProcessor.m */; };
|
||||
845A291F1FC8BC49007B49E3 /* BinaryDiskCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 845A291E1FC8BC49007B49E3 /* BinaryDiskCache.swift */; };
|
||||
845A29201FC8BC49007B49E3 /* BinaryDiskCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 845A291E1FC8BC49007B49E3 /* BinaryDiskCache.swift */; };
|
||||
845DE0F31B80477100D1571B /* NSSet+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 845DE0F11B80477100D1571B /* NSSet+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
845DE0F41B80477100D1571B /* NSSet+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 845DE0F21B80477100D1571B /* NSSet+RSCore.m */; };
|
||||
8461387F1DB3F5BE00048B83 /* RSToolbarItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8461387E1DB3F5BE00048B83 /* RSToolbarItem.swift */; };
|
||||
8479213C1FBA426B004AD08C /* WebViewWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8479213B1FBA426B004AD08C /* WebViewWindow.xib */; };
|
||||
8479213E1FBA4285004AD08C /* WebViewWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8479213D1FBA4285004AD08C /* WebViewWindowController.swift */; };
|
||||
848F6AE91FC2BC50002D422E /* ThreadSafeCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848F6AE81FC2BC50002D422E /* ThreadSafeCache.swift */; };
|
||||
848F6AEA1FC2BC50002D422E /* ThreadSafeCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848F6AE81FC2BC50002D422E /* ThreadSafeCache.swift */; };
|
||||
849A339D1AC90A0A0015BA09 /* NSTableView+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 849A339B1AC90A0A0015BA09 /* NSTableView+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
849A339E1AC90A0A0015BA09 /* NSTableView+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 849A339C1AC90A0A0015BA09 /* NSTableView+RSCore.m */; };
|
||||
849B08971BF7BCE30090CEE4 /* NSPasteboard+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 849B08951BF7BCE30090CEE4 /* NSPasteboard+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
849B08981BF7BCE30090CEE4 /* NSPasteboard+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 849B08961BF7BCE30090CEE4 /* NSPasteboard+RSCore.m */; };
|
||||
849EE70D2039187D0082A1EA /* NSWindowController+RSCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849EE70C2039187D0082A1EA /* NSWindowController+RSCore.swift */; };
|
||||
849EE72320393A750082A1EA /* NSToolbar+RSCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849EE72220393A750082A1EA /* NSToolbar+RSCore.swift */; };
|
||||
849EE72520393AEA0082A1EA /* Array+RSCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849EE72420393AEA0082A1EA /* Array+RSCore.swift */; };
|
||||
84A8358A1D4EC7B80004C598 /* PlistProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A835891D4EC7B80004C598 /* PlistProviderProtocol.swift */; };
|
||||
84AD1EA520315A8800BC20B7 /* PasteboardWriterOwner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AD1EA420315A8700BC20B7 /* PasteboardWriterOwner.swift */; };
|
||||
84AD1EA820315BA900BC20B7 /* NSPasteboard+RSCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AD1EA720315BA900BC20B7 /* NSPasteboard+RSCore.swift */; };
|
||||
84B890561C59CF1600D8BF23 /* NSString+ExtrasTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B890551C59CF1600D8BF23 /* NSString+ExtrasTests.m */; };
|
||||
84B99C941FAE64D500ECDEDB /* DisplayNameProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B99C931FAE64D400ECDEDB /* DisplayNameProvider.swift */; };
|
||||
84B99C951FAE64D500ECDEDB /* DisplayNameProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B99C931FAE64D400ECDEDB /* DisplayNameProvider.swift */; };
|
||||
84B99C9A1FAE650100ECDEDB /* OPMLRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B99C991FAE650100ECDEDB /* OPMLRepresentable.swift */; };
|
||||
84B99C9B1FAE650100ECDEDB /* OPMLRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B99C991FAE650100ECDEDB /* OPMLRepresentable.swift */; };
|
||||
84BB45431D6909C700B48537 /* NSMutableDictionary-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BB45421D6909C700B48537 /* NSMutableDictionary-Extensions.swift */; };
|
||||
84C326872038C9F6006A025C /* CoalescingQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C326862038C9F6006A025C /* CoalescingQueue.swift */; };
|
||||
84C632A0200D30F1007BEEAA /* NSAppleEventDescriptor+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84C6329E200D30F1007BEEAA /* NSAppleEventDescriptor+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84C632A1200D30F1007BEEAA /* NSAppleEventDescriptor+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84C6329F200D30F1007BEEAA /* NSAppleEventDescriptor+RSCore.m */; };
|
||||
84C632A4200D356E007BEEAA /* SendToBlogEditorApp.h in Headers */ = {isa = PBXBuildFile; fileRef = 84C632A2200D356E007BEEAA /* SendToBlogEditorApp.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84C632A5200D356E007BEEAA /* SendToBlogEditorApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 84C632A3200D356E007BEEAA /* SendToBlogEditorApp.m */; };
|
||||
84C687301FBAA30800345C9E /* LogWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84C6872F1FBAA30800345C9E /* LogWindow.xib */; };
|
||||
84C687321FBAA3DF00345C9E /* LogWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C687311FBAA3DF00345C9E /* LogWindowController.swift */; };
|
||||
84C687351FBC025600345C9E /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C687341FBC025600345C9E /* Log.swift */; };
|
||||
84C687361FBC025600345C9E /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C687341FBC025600345C9E /* Log.swift */; };
|
||||
84C687381FBC028900345C9E /* LogItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C687371FBC028900345C9E /* LogItem.swift */; };
|
||||
84C687391FBC028900345C9E /* LogItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C687371FBC028900345C9E /* LogItem.swift */; };
|
||||
84CFF4FA1AC3C69700CEA6C8 /* RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF4F91AC3C69700CEA6C8 /* RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5001AC3C69700CEA6C8 /* RSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84CFF4F41AC3C69700CEA6C8 /* RSCore.framework */; };
|
||||
84CFF5071AC3C69700CEA6C8 /* RSCoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5061AC3C69700CEA6C8 /* RSCoreTests.m */; };
|
||||
84CFF5121AC3C6D800CEA6C8 /* RSBlocks.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5101AC3C6D800CEA6C8 /* RSBlocks.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5131AC3C6D800CEA6C8 /* RSBlocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5111AC3C6D800CEA6C8 /* RSBlocks.m */; };
|
||||
84CFF5161AC3C73000CEA6C8 /* RSConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5141AC3C73000CEA6C8 /* RSConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5171AC3C73000CEA6C8 /* RSConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5151AC3C73000CEA6C8 /* RSConstants.m */; };
|
||||
84CFF51A1AC3C77500CEA6C8 /* RSPlatform.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5181AC3C77500CEA6C8 /* RSPlatform.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF51B1AC3C77500CEA6C8 /* RSPlatform.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5191AC3C77500CEA6C8 /* RSPlatform.m */; };
|
||||
84CFF5221AC3C89D00CEA6C8 /* NSObject+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5201AC3C89D00CEA6C8 /* NSObject+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5231AC3C89D00CEA6C8 /* NSObject+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5211AC3C89D00CEA6C8 /* NSObject+RSCore.m */; };
|
||||
84CFF5271AC3C9A200CEA6C8 /* NSArray+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5251AC3C9A200CEA6C8 /* NSArray+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5281AC3C9A200CEA6C8 /* NSArray+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5261AC3C9A200CEA6C8 /* NSArray+RSCore.m */; };
|
||||
84CFF52B1AC3CA9700CEA6C8 /* NSData+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5291AC3CA9700CEA6C8 /* NSData+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF52C1AC3CA9700CEA6C8 /* NSData+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF52A1AC3CA9700CEA6C8 /* NSData+RSCore.m */; };
|
||||
84CFF52F1AC3CB1900CEA6C8 /* NSDate+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF52D1AC3CB1900CEA6C8 /* NSDate+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5301AC3CB1900CEA6C8 /* NSDate+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF52E1AC3CB1900CEA6C8 /* NSDate+RSCore.m */; };
|
||||
84CFF5331AC3CB6800CEA6C8 /* NSDictionary+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5311AC3CB6800CEA6C8 /* NSDictionary+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5341AC3CB6800CEA6C8 /* NSDictionary+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5321AC3CB6800CEA6C8 /* NSDictionary+RSCore.m */; };
|
||||
84CFF5371AC3CBB200CEA6C8 /* NSMutableArray+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5351AC3CBB200CEA6C8 /* NSMutableArray+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5381AC3CBB200CEA6C8 /* NSMutableArray+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5361AC3CBB200CEA6C8 /* NSMutableArray+RSCore.m */; };
|
||||
84CFF53B1AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5391AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF53C1AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF53A1AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.m */; };
|
||||
84CFF53F1AC3CD0100CEA6C8 /* NSMutableSet+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF53D1AC3CD0100CEA6C8 /* NSMutableSet+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5401AC3CD0100CEA6C8 /* NSMutableSet+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF53E1AC3CD0100CEA6C8 /* NSMutableSet+RSCore.m */; };
|
||||
84CFF5431AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5411AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5441AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5421AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.m */; };
|
||||
84CFF5471AC3CD8000CEA6C8 /* NSTimer+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5451AC3CD8000CEA6C8 /* NSTimer+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5481AC3CD8000CEA6C8 /* NSTimer+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5461AC3CD8000CEA6C8 /* NSTimer+RSCore.m */; };
|
||||
84CFF54B1AC3CDAC00CEA6C8 /* NSString+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5491AC3CDAC00CEA6C8 /* NSString+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF54C1AC3CDAC00CEA6C8 /* NSString+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF54A1AC3CDAC00CEA6C8 /* NSString+RSCore.m */; };
|
||||
84CFF5531AC3CF4700CEA6C8 /* NSColor+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5511AC3CF4700CEA6C8 /* NSColor+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5541AC3CF4700CEA6C8 /* NSColor+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5521AC3CF4700CEA6C8 /* NSColor+RSCore.m */; };
|
||||
84CFF5581AC3CF9100CEA6C8 /* NSView+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5561AC3CF9100CEA6C8 /* NSView+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5591AC3CF9100CEA6C8 /* NSView+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5571AC3CF9100CEA6C8 /* NSView+RSCore.m */; };
|
||||
84CFF55C1AC3D01F00CEA6C8 /* RSBackgroundColorView.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF55A1AC3D01F00CEA6C8 /* RSBackgroundColorView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF55D1AC3D01F00CEA6C8 /* RSBackgroundColorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF55B1AC3D01F00CEA6C8 /* RSBackgroundColorView.m */; };
|
||||
84CFF5641AC3D13C00CEA6C8 /* RSImageRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5621AC3D13C00CEA6C8 /* RSImageRenderer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF5651AC3D13C00CEA6C8 /* RSImageRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5631AC3D13C00CEA6C8 /* RSImageRenderer.m */; };
|
||||
84CFF5691AC3D1B000CEA6C8 /* RSScaling.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5671AC3D1B000CEA6C8 /* RSScaling.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF56A1AC3D1B000CEA6C8 /* RSScaling.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5681AC3D1B000CEA6C8 /* RSScaling.m */; };
|
||||
84CFF56D1AC3D20A00CEA6C8 /* NSImage+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF56B1AC3D20A00CEA6C8 /* NSImage+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84CFF56E1AC3D20A00CEA6C8 /* NSImage+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF56C1AC3D20A00CEA6C8 /* NSImage+RSCore.m */; };
|
||||
84D5BA1E201E87E2009092BD /* URLPasteboardWriter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D5BA1D201E87E2009092BD /* URLPasteboardWriter.swift */; };
|
||||
84E185C6203BEA7900F69BFA /* NSAttributedString+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84E185C4203BEA7900F69BFA /* NSAttributedString+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84E185C7203BEA7900F69BFA /* NSAttributedString+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E185C5203BEA7900F69BFA /* NSAttributedString+RSCore.m */; };
|
||||
84E34DA61F9FA1070077082F /* UndoableCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E34DA51F9FA1070077082F /* UndoableCommand.swift */; };
|
||||
84E8E0D9202EC39800562D8F /* NSMenu+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E8E0D8202EC39800562D8F /* NSMenu+Extensions.swift */; };
|
||||
84F20F831F16BA6200D8E682 /* PropertyList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F20F821F16BA6200D8E682 /* PropertyList.swift */; };
|
||||
84FE9FC31C00453900081CE9 /* NSStoryboard+RSCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 84FE9FC11C00453900081CE9 /* NSStoryboard+RSCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
84FE9FC41C00453900081CE9 /* NSStoryboard+RSCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 84FE9FC21C00453900081CE9 /* NSStoryboard+RSCore.m */; };
|
||||
84FEB4AC1D19D7F4004727E5 /* Date+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84FEB4AB1D19D7F4004727E5 /* Date+Extensions.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
84CFF5011AC3C69700CEA6C8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 84CFF4EB1AC3C69700CEA6C8 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 84CFF4F31AC3C69700CEA6C8;
|
||||
remoteInfo = RSCore;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
8402047D1FBCE77900D94C1A /* BatchUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BatchUpdate.swift; path = RSCore/BatchUpdate.swift; sourceTree = "<group>"; };
|
||||
84134D1D1C59D5450063FD24 /* NSCalendar+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSCalendar+RSCore.h"; sourceTree = "<group>"; };
|
||||
84134D1E1C59D5450063FD24 /* NSCalendar+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSCalendar+RSCore.m"; sourceTree = "<group>"; };
|
||||
8414CBA61C95F2EA00333C12 /* Set+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Set+Extensions.swift"; sourceTree = "<group>"; };
|
||||
8414CBA91C95F8F700333C12 /* RSGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSGeometry.h; sourceTree = "<group>"; };
|
||||
8414CBAA1C95F8F700333C12 /* RSGeometry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSGeometry.m; sourceTree = "<group>"; };
|
||||
8415CB881BF84D24007B1E98 /* NSEvent+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSEvent+RSCore.h"; sourceTree = "<group>"; };
|
||||
8415CB891BF84D24007B1E98 /* NSEvent+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSEvent+RSCore.m"; sourceTree = "<group>"; };
|
||||
8417FE001AC67D430048E9B7 /* RSOpaqueContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSOpaqueContainerView.h; sourceTree = "<group>"; };
|
||||
8417FE011AC67D430048E9B7 /* RSOpaqueContainerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSOpaqueContainerView.m; sourceTree = "<group>"; };
|
||||
842635561D7FA1C800196285 /* NSTableView+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSTableView+Extensions.swift"; sourceTree = "<group>"; };
|
||||
842635581D7FA24800196285 /* NSOutlineView+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSOutlineView+Extensions.swift"; sourceTree = "<group>"; };
|
||||
842DD7BC1E14993900E061EB /* RSCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RSCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
842DD7BF1E14993900E061EB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
842E45CB1ED623C7000A8B52 /* UniqueIdentifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UniqueIdentifier.swift; sourceTree = "<group>"; };
|
||||
8432B1851DACA0E90057D6DF /* NSResponder-Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSResponder-Extensions.swift"; sourceTree = "<group>"; };
|
||||
8432B1871DACA2060057D6DF /* NSWindow-Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSWindow-Extensions.swift"; sourceTree = "<group>"; };
|
||||
8434D15B200BD6F400D6281E /* UserApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = UserApp.swift; path = AppKit/UserApp.swift; sourceTree = "<group>"; };
|
||||
84411E721FE5FFC3004B527F /* NSImage+RSCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "NSImage+RSCore.swift"; path = "Images/NSImage+RSCore.swift"; sourceTree = "<group>"; };
|
||||
844B5B561FE9D36000C7C76A /* Keyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Keyboard.swift; path = RSCore/Keyboard.swift; sourceTree = "<group>"; };
|
||||
844C91591B65753E0051FC1B /* RSPlist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RSPlist.h; path = RSCore/RSPlist.h; sourceTree = "<group>"; };
|
||||
844C915A1B65753E0051FC1B /* RSPlist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RSPlist.m; path = RSCore/RSPlist.m; sourceTree = "<group>"; };
|
||||
844F91D31D90D86100820C48 /* RSTransparentContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSTransparentContainerView.h; sourceTree = "<group>"; };
|
||||
844F91D41D90D86100820C48 /* RSTransparentContainerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSTransparentContainerView.m; sourceTree = "<group>"; };
|
||||
84536F641BB856D4001E1639 /* NSFileManager+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSFileManager+RSCore.h"; sourceTree = "<group>"; };
|
||||
84536F651BB856D4001E1639 /* NSFileManager+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSFileManager+RSCore.m"; sourceTree = "<group>"; };
|
||||
8453F7DC1BDF337800B1C8ED /* RSMacroProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RSMacroProcessor.h; path = RSCore/RSMacroProcessor.h; sourceTree = "<group>"; };
|
||||
8453F7DD1BDF337800B1C8ED /* RSMacroProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RSMacroProcessor.m; path = RSCore/RSMacroProcessor.m; sourceTree = "<group>"; };
|
||||
845A291E1FC8BC49007B49E3 /* BinaryDiskCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = BinaryDiskCache.swift; path = RSCore/BinaryDiskCache.swift; sourceTree = "<group>"; };
|
||||
845DE0F11B80477100D1571B /* NSSet+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSSet+RSCore.h"; sourceTree = "<group>"; };
|
||||
845DE0F21B80477100D1571B /* NSSet+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSSet+RSCore.m"; sourceTree = "<group>"; };
|
||||
8461387E1DB3F5BE00048B83 /* RSToolbarItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RSToolbarItem.swift; sourceTree = "<group>"; };
|
||||
8479213B1FBA426B004AD08C /* WebViewWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = WebViewWindow.xib; path = AppKit/WebViewWindow.xib; sourceTree = "<group>"; };
|
||||
8479213D1FBA4285004AD08C /* WebViewWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = WebViewWindowController.swift; path = AppKit/WebViewWindowController.swift; sourceTree = "<group>"; };
|
||||
848F6AE81FC2BC50002D422E /* ThreadSafeCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ThreadSafeCache.swift; path = RSCore/ThreadSafeCache.swift; sourceTree = "<group>"; };
|
||||
849A339B1AC90A0A0015BA09 /* NSTableView+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSTableView+RSCore.h"; sourceTree = "<group>"; };
|
||||
849A339C1AC90A0A0015BA09 /* NSTableView+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSTableView+RSCore.m"; sourceTree = "<group>"; };
|
||||
849B08951BF7BCE30090CEE4 /* NSPasteboard+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSPasteboard+RSCore.h"; sourceTree = "<group>"; };
|
||||
849B08961BF7BCE30090CEE4 /* NSPasteboard+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSPasteboard+RSCore.m"; sourceTree = "<group>"; };
|
||||
849EE70C2039187D0082A1EA /* NSWindowController+RSCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "NSWindowController+RSCore.swift"; path = "AppKit/NSWindowController+RSCore.swift"; sourceTree = "<group>"; };
|
||||
849EE72220393A750082A1EA /* NSToolbar+RSCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "NSToolbar+RSCore.swift"; path = "AppKit/NSToolbar+RSCore.swift"; sourceTree = "<group>"; };
|
||||
849EE72420393AEA0082A1EA /* Array+RSCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+RSCore.swift"; sourceTree = "<group>"; };
|
||||
84A835891D4EC7B80004C598 /* PlistProviderProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PlistProviderProtocol.swift; path = RSCore/PlistProviderProtocol.swift; sourceTree = "<group>"; };
|
||||
84AD1EA420315A8700BC20B7 /* PasteboardWriterOwner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PasteboardWriterOwner.swift; path = RSCore/PasteboardWriterOwner.swift; sourceTree = "<group>"; };
|
||||
84AD1EA720315BA900BC20B7 /* NSPasteboard+RSCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "NSPasteboard+RSCore.swift"; path = "AppKit/NSPasteboard+RSCore.swift"; sourceTree = "<group>"; };
|
||||
84B890551C59CF1600D8BF23 /* NSString+ExtrasTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+ExtrasTests.m"; sourceTree = "<group>"; };
|
||||
84B99C931FAE64D400ECDEDB /* DisplayNameProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DisplayNameProvider.swift; path = RSCore/DisplayNameProvider.swift; sourceTree = "<group>"; };
|
||||
84B99C991FAE650100ECDEDB /* OPMLRepresentable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OPMLRepresentable.swift; path = RSCore/OPMLRepresentable.swift; sourceTree = "<group>"; };
|
||||
84BB45421D6909C700B48537 /* NSMutableDictionary-Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSMutableDictionary-Extensions.swift"; sourceTree = "<group>"; };
|
||||
84C326862038C9F6006A025C /* CoalescingQueue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CoalescingQueue.swift; path = RSCore/CoalescingQueue.swift; sourceTree = "<group>"; };
|
||||
84C6329E200D30F1007BEEAA /* NSAppleEventDescriptor+RSCore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "NSAppleEventDescriptor+RSCore.h"; path = "AppKit/NSAppleEventDescriptor+RSCore.h"; sourceTree = "<group>"; };
|
||||
84C6329F200D30F1007BEEAA /* NSAppleEventDescriptor+RSCore.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "NSAppleEventDescriptor+RSCore.m"; path = "AppKit/NSAppleEventDescriptor+RSCore.m"; sourceTree = "<group>"; };
|
||||
84C632A2200D356E007BEEAA /* SendToBlogEditorApp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SendToBlogEditorApp.h; path = AppKit/SendToBlogEditorApp.h; sourceTree = "<group>"; };
|
||||
84C632A3200D356E007BEEAA /* SendToBlogEditorApp.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SendToBlogEditorApp.m; path = AppKit/SendToBlogEditorApp.m; sourceTree = "<group>"; };
|
||||
84C6872F1FBAA30800345C9E /* LogWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = LogWindow.xib; path = AppKit/LogWindow.xib; sourceTree = "<group>"; };
|
||||
84C687311FBAA3DF00345C9E /* LogWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LogWindowController.swift; path = AppKit/LogWindowController.swift; sourceTree = "<group>"; };
|
||||
84C687341FBC025600345C9E /* Log.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = "<group>"; };
|
||||
84C687371FBC028900345C9E /* LogItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogItem.swift; sourceTree = "<group>"; };
|
||||
84CFF4F41AC3C69700CEA6C8 /* RSCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RSCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
84CFF4F81AC3C69700CEA6C8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = RSCore/Info.plist; sourceTree = "<group>"; };
|
||||
84CFF4F91AC3C69700CEA6C8 /* RSCore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RSCore.h; path = RSCore/RSCore.h; sourceTree = "<group>"; };
|
||||
84CFF4FF1AC3C69700CEA6C8 /* RSCoreTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RSCoreTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
84CFF5051AC3C69700CEA6C8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
84CFF5061AC3C69700CEA6C8 /* RSCoreTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RSCoreTests.m; sourceTree = "<group>"; };
|
||||
84CFF5101AC3C6D800CEA6C8 /* RSBlocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RSBlocks.h; path = RSCore/RSBlocks.h; sourceTree = "<group>"; };
|
||||
84CFF5111AC3C6D800CEA6C8 /* RSBlocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RSBlocks.m; path = RSCore/RSBlocks.m; sourceTree = "<group>"; };
|
||||
84CFF5141AC3C73000CEA6C8 /* RSConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RSConstants.h; path = RSCore/RSConstants.h; sourceTree = "<group>"; };
|
||||
84CFF5151AC3C73000CEA6C8 /* RSConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RSConstants.m; path = RSCore/RSConstants.m; sourceTree = "<group>"; };
|
||||
84CFF5181AC3C77500CEA6C8 /* RSPlatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RSPlatform.h; path = RSCore/RSPlatform.h; sourceTree = "<group>"; };
|
||||
84CFF5191AC3C77500CEA6C8 /* RSPlatform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RSPlatform.m; path = RSCore/RSPlatform.m; sourceTree = "<group>"; };
|
||||
84CFF5201AC3C89D00CEA6C8 /* NSObject+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF5211AC3C89D00CEA6C8 /* NSObject+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF5251AC3C9A200CEA6C8 /* NSArray+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF5261AC3C9A200CEA6C8 /* NSArray+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF5291AC3CA9700CEA6C8 /* NSData+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF52A1AC3CA9700CEA6C8 /* NSData+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF52D1AC3CB1900CEA6C8 /* NSDate+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF52E1AC3CB1900CEA6C8 /* NSDate+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF5311AC3CB6800CEA6C8 /* NSDictionary+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF5321AC3CB6800CEA6C8 /* NSDictionary+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF5351AC3CBB200CEA6C8 /* NSMutableArray+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF5361AC3CBB200CEA6C8 /* NSMutableArray+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF5391AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableDictionary+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF53A1AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableDictionary+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF53D1AC3CD0100CEA6C8 /* NSMutableSet+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableSet+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF53E1AC3CD0100CEA6C8 /* NSMutableSet+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableSet+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF5411AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF5421AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNotificationCenter+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF5451AC3CD8000CEA6C8 /* NSTimer+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSTimer+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF5461AC3CD8000CEA6C8 /* NSTimer+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSTimer+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF5491AC3CDAC00CEA6C8 /* NSString+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF54A1AC3CDAC00CEA6C8 /* NSString+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF5511AC3CF4700CEA6C8 /* NSColor+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSColor+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF5521AC3CF4700CEA6C8 /* NSColor+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSColor+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF5561AC3CF9100CEA6C8 /* NSView+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSView+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF5571AC3CF9100CEA6C8 /* NSView+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSView+RSCore.m"; sourceTree = "<group>"; };
|
||||
84CFF55A1AC3D01F00CEA6C8 /* RSBackgroundColorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSBackgroundColorView.h; sourceTree = "<group>"; };
|
||||
84CFF55B1AC3D01F00CEA6C8 /* RSBackgroundColorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSBackgroundColorView.m; sourceTree = "<group>"; };
|
||||
84CFF5621AC3D13C00CEA6C8 /* RSImageRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSImageRenderer.h; sourceTree = "<group>"; };
|
||||
84CFF5631AC3D13C00CEA6C8 /* RSImageRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSImageRenderer.m; sourceTree = "<group>"; };
|
||||
84CFF5671AC3D1B000CEA6C8 /* RSScaling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSScaling.h; sourceTree = "<group>"; };
|
||||
84CFF5681AC3D1B000CEA6C8 /* RSScaling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSScaling.m; sourceTree = "<group>"; };
|
||||
84CFF56B1AC3D20A00CEA6C8 /* NSImage+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSImage+RSCore.h"; sourceTree = "<group>"; };
|
||||
84CFF56C1AC3D20A00CEA6C8 /* NSImage+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSImage+RSCore.m"; sourceTree = "<group>"; };
|
||||
84D5BA1D201E87E2009092BD /* URLPasteboardWriter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = URLPasteboardWriter.swift; path = AppKit/URLPasteboardWriter.swift; sourceTree = "<group>"; };
|
||||
84E185C4203BEA7900F69BFA /* NSAttributedString+RSCore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "NSAttributedString+RSCore.h"; path = "AppKit/NSAttributedString+RSCore.h"; sourceTree = "<group>"; };
|
||||
84E185C5203BEA7900F69BFA /* NSAttributedString+RSCore.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "NSAttributedString+RSCore.m"; path = "AppKit/NSAttributedString+RSCore.m"; sourceTree = "<group>"; };
|
||||
84E34DA51F9FA1070077082F /* UndoableCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = UndoableCommand.swift; path = RSCore/UndoableCommand.swift; sourceTree = "<group>"; };
|
||||
84E8E0D8202EC39800562D8F /* NSMenu+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "NSMenu+Extensions.swift"; path = "AppKit/NSMenu+Extensions.swift"; sourceTree = "<group>"; };
|
||||
84F20F821F16BA6200D8E682 /* PropertyList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PropertyList.swift; sourceTree = "<group>"; };
|
||||
84FE9FC11C00453900081CE9 /* NSStoryboard+RSCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSStoryboard+RSCore.h"; sourceTree = "<group>"; };
|
||||
84FE9FC21C00453900081CE9 /* NSStoryboard+RSCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSStoryboard+RSCore.m"; sourceTree = "<group>"; };
|
||||
84FEB4AB1D19D7F4004727E5 /* Date+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Date+Extensions.swift"; sourceTree = "<group>"; };
|
||||
D511EEFD20242E4C00712EC3 /* RSCore_target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = RSCore_target.xcconfig; sourceTree = "<group>"; };
|
||||
D511EEFE20242E4C00712EC3 /* RSCore_project.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = RSCore_project.xcconfig; sourceTree = "<group>"; };
|
||||
D511EEFF20242E4C00712EC3 /* RSCoreTests_target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = RSCoreTests_target.xcconfig; sourceTree = "<group>"; };
|
||||
D511EF0020242E4C00712EC3 /* RSCore_project_release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = RSCore_project_release.xcconfig; sourceTree = "<group>"; };
|
||||
D511EF0120242E4C00712EC3 /* RSCore_project_debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = RSCore_project_debug.xcconfig; sourceTree = "<group>"; };
|
||||
D511EF2620243B6300712EC3 /* RSCore_mac_target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = RSCore_mac_target.xcconfig; sourceTree = "<group>"; };
|
||||
D511EF2720243B6300712EC3 /* RSCore_ios_target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = RSCore_ios_target.xcconfig; sourceTree = "<group>"; };
|
||||
D511EF2A202446E300712EC3 /* RSCore_ios_target_debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = RSCore_ios_target_debug.xcconfig; sourceTree = "<group>"; };
|
||||
D511EF2B202446E300712EC3 /* RSCore_ios_target_release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = RSCore_ios_target_release.xcconfig; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
842DD7B81E14993900E061EB /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
84CFF4F01AC3C69700CEA6C8 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
84CFF4FC1AC3C69700CEA6C8 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
84CFF5001AC3C69700CEA6C8 /* RSCore.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
842DD7BD1E14993900E061EB /* RSCoreiOS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
842DD7BF1E14993900E061EB /* Info.plist */,
|
||||
);
|
||||
path = RSCoreiOS;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
842DD7F91E1499FA00E061EB /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84CFF55A1AC3D01F00CEA6C8 /* RSBackgroundColorView.h */,
|
||||
84CFF55B1AC3D01F00CEA6C8 /* RSBackgroundColorView.m */,
|
||||
844F91D31D90D86100820C48 /* RSTransparentContainerView.h */,
|
||||
844F91D41D90D86100820C48 /* RSTransparentContainerView.m */,
|
||||
8417FE001AC67D430048E9B7 /* RSOpaqueContainerView.h */,
|
||||
8417FE011AC67D430048E9B7 /* RSOpaqueContainerView.m */,
|
||||
);
|
||||
name = Views;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
84CFF4EA1AC3C69700CEA6C8 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84CFF4F91AC3C69700CEA6C8 /* RSCore.h */,
|
||||
84CFF5101AC3C6D800CEA6C8 /* RSBlocks.h */,
|
||||
84CFF5111AC3C6D800CEA6C8 /* RSBlocks.m */,
|
||||
84CFF5141AC3C73000CEA6C8 /* RSConstants.h */,
|
||||
84CFF5151AC3C73000CEA6C8 /* RSConstants.m */,
|
||||
84CFF5181AC3C77500CEA6C8 /* RSPlatform.h */,
|
||||
84CFF5191AC3C77500CEA6C8 /* RSPlatform.m */,
|
||||
845A291E1FC8BC49007B49E3 /* BinaryDiskCache.swift */,
|
||||
844C91591B65753E0051FC1B /* RSPlist.h */,
|
||||
844C915A1B65753E0051FC1B /* RSPlist.m */,
|
||||
8453F7DC1BDF337800B1C8ED /* RSMacroProcessor.h */,
|
||||
8453F7DD1BDF337800B1C8ED /* RSMacroProcessor.m */,
|
||||
84B99C931FAE64D400ECDEDB /* DisplayNameProvider.swift */,
|
||||
84B99C991FAE650100ECDEDB /* OPMLRepresentable.swift */,
|
||||
84A835891D4EC7B80004C598 /* PlistProviderProtocol.swift */,
|
||||
842E45CB1ED623C7000A8B52 /* UniqueIdentifier.swift */,
|
||||
84E34DA51F9FA1070077082F /* UndoableCommand.swift */,
|
||||
8402047D1FBCE77900D94C1A /* BatchUpdate.swift */,
|
||||
848F6AE81FC2BC50002D422E /* ThreadSafeCache.swift */,
|
||||
844B5B561FE9D36000C7C76A /* Keyboard.swift */,
|
||||
84AD1EA420315A8700BC20B7 /* PasteboardWriterOwner.swift */,
|
||||
84C326862038C9F6006A025C /* CoalescingQueue.swift */,
|
||||
84CFF5241AC3C8A200CEA6C8 /* Foundation */,
|
||||
84CFF5551AC3CF4A00CEA6C8 /* AppKit */,
|
||||
84CFF5661AC3D13F00CEA6C8 /* Images */,
|
||||
84CFF4F81AC3C69700CEA6C8 /* Info.plist */,
|
||||
84CFF5031AC3C69700CEA6C8 /* RSCoreTests */,
|
||||
842DD7BD1E14993900E061EB /* RSCoreiOS */,
|
||||
84CFF4F51AC3C69700CEA6C8 /* Products */,
|
||||
D511EEFC20242E4C00712EC3 /* xcconfig */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
84CFF4F51AC3C69700CEA6C8 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84CFF4F41AC3C69700CEA6C8 /* RSCore.framework */,
|
||||
84CFF4FF1AC3C69700CEA6C8 /* RSCoreTests.xctest */,
|
||||
842DD7BC1E14993900E061EB /* RSCore.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
84CFF5031AC3C69700CEA6C8 /* RSCoreTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84CFF5061AC3C69700CEA6C8 /* RSCoreTests.m */,
|
||||
84B890551C59CF1600D8BF23 /* NSString+ExtrasTests.m */,
|
||||
84CFF5041AC3C69700CEA6C8 /* Supporting Files */,
|
||||
);
|
||||
path = RSCoreTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
84CFF5041AC3C69700CEA6C8 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84CFF5051AC3C69700CEA6C8 /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
84CFF5241AC3C8A200CEA6C8 /* Foundation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84CFF5251AC3C9A200CEA6C8 /* NSArray+RSCore.h */,
|
||||
84CFF5261AC3C9A200CEA6C8 /* NSArray+RSCore.m */,
|
||||
84134D1D1C59D5450063FD24 /* NSCalendar+RSCore.h */,
|
||||
84134D1E1C59D5450063FD24 /* NSCalendar+RSCore.m */,
|
||||
84CFF5291AC3CA9700CEA6C8 /* NSData+RSCore.h */,
|
||||
84CFF52A1AC3CA9700CEA6C8 /* NSData+RSCore.m */,
|
||||
84CFF52D1AC3CB1900CEA6C8 /* NSDate+RSCore.h */,
|
||||
84CFF52E1AC3CB1900CEA6C8 /* NSDate+RSCore.m */,
|
||||
84CFF5311AC3CB6800CEA6C8 /* NSDictionary+RSCore.h */,
|
||||
84CFF5321AC3CB6800CEA6C8 /* NSDictionary+RSCore.m */,
|
||||
84536F641BB856D4001E1639 /* NSFileManager+RSCore.h */,
|
||||
84536F651BB856D4001E1639 /* NSFileManager+RSCore.m */,
|
||||
84CFF5351AC3CBB200CEA6C8 /* NSMutableArray+RSCore.h */,
|
||||
84CFF5361AC3CBB200CEA6C8 /* NSMutableArray+RSCore.m */,
|
||||
84CFF5391AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.h */,
|
||||
84CFF53A1AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.m */,
|
||||
84CFF53D1AC3CD0100CEA6C8 /* NSMutableSet+RSCore.h */,
|
||||
84CFF53E1AC3CD0100CEA6C8 /* NSMutableSet+RSCore.m */,
|
||||
84CFF5411AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.h */,
|
||||
84CFF5421AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.m */,
|
||||
84CFF5201AC3C89D00CEA6C8 /* NSObject+RSCore.h */,
|
||||
84CFF5211AC3C89D00CEA6C8 /* NSObject+RSCore.m */,
|
||||
845DE0F11B80477100D1571B /* NSSet+RSCore.h */,
|
||||
845DE0F21B80477100D1571B /* NSSet+RSCore.m */,
|
||||
84CFF5491AC3CDAC00CEA6C8 /* NSString+RSCore.h */,
|
||||
84CFF54A1AC3CDAC00CEA6C8 /* NSString+RSCore.m */,
|
||||
84CFF5451AC3CD8000CEA6C8 /* NSTimer+RSCore.h */,
|
||||
84CFF5461AC3CD8000CEA6C8 /* NSTimer+RSCore.m */,
|
||||
849EE72420393AEA0082A1EA /* Array+RSCore.swift */,
|
||||
84FEB4AB1D19D7F4004727E5 /* Date+Extensions.swift */,
|
||||
84BB45421D6909C700B48537 /* NSMutableDictionary-Extensions.swift */,
|
||||
8414CBA61C95F2EA00333C12 /* Set+Extensions.swift */,
|
||||
84F20F821F16BA6200D8E682 /* PropertyList.swift */,
|
||||
);
|
||||
name = Foundation;
|
||||
path = RSCore;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
84CFF5551AC3CF4A00CEA6C8 /* AppKit */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84CFF5511AC3CF4700CEA6C8 /* NSColor+RSCore.h */,
|
||||
84C6329E200D30F1007BEEAA /* NSAppleEventDescriptor+RSCore.h */,
|
||||
84C6329F200D30F1007BEEAA /* NSAppleEventDescriptor+RSCore.m */,
|
||||
84E185C4203BEA7900F69BFA /* NSAttributedString+RSCore.h */,
|
||||
84E185C5203BEA7900F69BFA /* NSAttributedString+RSCore.m */,
|
||||
84C632A2200D356E007BEEAA /* SendToBlogEditorApp.h */,
|
||||
84C632A3200D356E007BEEAA /* SendToBlogEditorApp.m */,
|
||||
84CFF5521AC3CF4700CEA6C8 /* NSColor+RSCore.m */,
|
||||
8415CB881BF84D24007B1E98 /* NSEvent+RSCore.h */,
|
||||
8415CB891BF84D24007B1E98 /* NSEvent+RSCore.m */,
|
||||
84CFF56B1AC3D20A00CEA6C8 /* NSImage+RSCore.h */,
|
||||
84CFF56C1AC3D20A00CEA6C8 /* NSImage+RSCore.m */,
|
||||
84E8E0D8202EC39800562D8F /* NSMenu+Extensions.swift */,
|
||||
842635581D7FA24800196285 /* NSOutlineView+Extensions.swift */,
|
||||
849B08951BF7BCE30090CEE4 /* NSPasteboard+RSCore.h */,
|
||||
849B08961BF7BCE30090CEE4 /* NSPasteboard+RSCore.m */,
|
||||
8432B1851DACA0E90057D6DF /* NSResponder-Extensions.swift */,
|
||||
84FE9FC11C00453900081CE9 /* NSStoryboard+RSCore.h */,
|
||||
84FE9FC21C00453900081CE9 /* NSStoryboard+RSCore.m */,
|
||||
842635561D7FA1C800196285 /* NSTableView+Extensions.swift */,
|
||||
849A339B1AC90A0A0015BA09 /* NSTableView+RSCore.h */,
|
||||
849A339C1AC90A0A0015BA09 /* NSTableView+RSCore.m */,
|
||||
849EE72220393A750082A1EA /* NSToolbar+RSCore.swift */,
|
||||
84CFF5561AC3CF9100CEA6C8 /* NSView+RSCore.h */,
|
||||
84CFF5571AC3CF9100CEA6C8 /* NSView+RSCore.m */,
|
||||
8432B1871DACA2060057D6DF /* NSWindow-Extensions.swift */,
|
||||
849EE70C2039187D0082A1EA /* NSWindowController+RSCore.swift */,
|
||||
8414CBA91C95F8F700333C12 /* RSGeometry.h */,
|
||||
8414CBAA1C95F8F700333C12 /* RSGeometry.m */,
|
||||
8461387E1DB3F5BE00048B83 /* RSToolbarItem.swift */,
|
||||
8479213B1FBA426B004AD08C /* WebViewWindow.xib */,
|
||||
8479213D1FBA4285004AD08C /* WebViewWindowController.swift */,
|
||||
84C6872F1FBAA30800345C9E /* LogWindow.xib */,
|
||||
84C687311FBAA3DF00345C9E /* LogWindowController.swift */,
|
||||
84C687341FBC025600345C9E /* Log.swift */,
|
||||
84C687371FBC028900345C9E /* LogItem.swift */,
|
||||
8434D15B200BD6F400D6281E /* UserApp.swift */,
|
||||
84D5BA1D201E87E2009092BD /* URLPasteboardWriter.swift */,
|
||||
84AD1EA720315BA900BC20B7 /* NSPasteboard+RSCore.swift */,
|
||||
842DD7F91E1499FA00E061EB /* Views */,
|
||||
);
|
||||
name = AppKit;
|
||||
path = RSCore;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
84CFF5661AC3D13F00CEA6C8 /* Images */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84CFF5621AC3D13C00CEA6C8 /* RSImageRenderer.h */,
|
||||
84CFF5631AC3D13C00CEA6C8 /* RSImageRenderer.m */,
|
||||
84CFF5671AC3D1B000CEA6C8 /* RSScaling.h */,
|
||||
84CFF5681AC3D1B000CEA6C8 /* RSScaling.m */,
|
||||
84411E721FE5FFC3004B527F /* NSImage+RSCore.swift */,
|
||||
);
|
||||
name = Images;
|
||||
path = RSCore;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D511EEFC20242E4C00712EC3 /* xcconfig */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D511EEFE20242E4C00712EC3 /* RSCore_project.xcconfig */,
|
||||
D511EF0120242E4C00712EC3 /* RSCore_project_debug.xcconfig */,
|
||||
D511EF0020242E4C00712EC3 /* RSCore_project_release.xcconfig */,
|
||||
D511EEFD20242E4C00712EC3 /* RSCore_target.xcconfig */,
|
||||
D511EF2620243B6300712EC3 /* RSCore_mac_target.xcconfig */,
|
||||
D511EF2720243B6300712EC3 /* RSCore_ios_target.xcconfig */,
|
||||
D511EF2A202446E300712EC3 /* RSCore_ios_target_debug.xcconfig */,
|
||||
D511EF2B202446E300712EC3 /* RSCore_ios_target_release.xcconfig */,
|
||||
D511EEFF20242E4C00712EC3 /* RSCoreTests_target.xcconfig */,
|
||||
);
|
||||
path = xcconfig;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
842DD7B91E14993900E061EB /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
842DD7E21E14996300E061EB /* NSMutableArray+RSCore.h in Headers */,
|
||||
842DD7E81E14996300E061EB /* NSNotificationCenter+RSCore.h in Headers */,
|
||||
842DD7DA1E14996300E061EB /* NSData+RSCore.h in Headers */,
|
||||
842DD7EE1E14996300E061EB /* NSString+RSCore.h in Headers */,
|
||||
842DD7C91E14995C00E061EB /* RSPlatform.h in Headers */,
|
||||
842DD7F51E14997600E061EB /* RSImageRenderer.h in Headers */,
|
||||
842DD7EC1E14996300E061EB /* NSSet+RSCore.h in Headers */,
|
||||
842DD7C41E14995000E061EB /* RSCore.h in Headers */,
|
||||
842DD7F71E14997600E061EB /* RSScaling.h in Headers */,
|
||||
842DD7C71E14995C00E061EB /* RSConstants.h in Headers */,
|
||||
842DD7D81E14996300E061EB /* NSCalendar+RSCore.h in Headers */,
|
||||
842DD7EA1E14996300E061EB /* NSObject+RSCore.h in Headers */,
|
||||
842DD7CD1E14995C00E061EB /* RSPlist.h in Headers */,
|
||||
842DD7C51E14995C00E061EB /* RSBlocks.h in Headers */,
|
||||
842DD7E01E14996300E061EB /* NSFileManager+RSCore.h in Headers */,
|
||||
842DD7E61E14996300E061EB /* NSMutableSet+RSCore.h in Headers */,
|
||||
842DD7D61E14996300E061EB /* NSArray+RSCore.h in Headers */,
|
||||
842DD7E41E14996300E061EB /* NSMutableDictionary+RSCore.h in Headers */,
|
||||
842DD7DE1E14996300E061EB /* NSDictionary+RSCore.h in Headers */,
|
||||
842DD7CF1E14995C00E061EB /* RSMacroProcessor.h in Headers */,
|
||||
842DD7DC1E14996300E061EB /* NSDate+RSCore.h in Headers */,
|
||||
842DD7F01E14996300E061EB /* NSTimer+RSCore.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
84CFF4F11AC3C69700CEA6C8 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
84CFF5691AC3D1B000CEA6C8 /* RSScaling.h in Headers */,
|
||||
84CFF53B1AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.h in Headers */,
|
||||
84CFF5581AC3CF9100CEA6C8 /* NSView+RSCore.h in Headers */,
|
||||
84CFF5221AC3C89D00CEA6C8 /* NSObject+RSCore.h in Headers */,
|
||||
84134D1F1C59D5450063FD24 /* NSCalendar+RSCore.h in Headers */,
|
||||
849A339D1AC90A0A0015BA09 /* NSTableView+RSCore.h in Headers */,
|
||||
84CFF52B1AC3CA9700CEA6C8 /* NSData+RSCore.h in Headers */,
|
||||
84CFF51A1AC3C77500CEA6C8 /* RSPlatform.h in Headers */,
|
||||
8417FE021AC67D430048E9B7 /* RSOpaqueContainerView.h in Headers */,
|
||||
84CFF5371AC3CBB200CEA6C8 /* NSMutableArray+RSCore.h in Headers */,
|
||||
84CFF5641AC3D13C00CEA6C8 /* RSImageRenderer.h in Headers */,
|
||||
84CFF5271AC3C9A200CEA6C8 /* NSArray+RSCore.h in Headers */,
|
||||
84CFF5531AC3CF4700CEA6C8 /* NSColor+RSCore.h in Headers */,
|
||||
84CFF4FA1AC3C69700CEA6C8 /* RSCore.h in Headers */,
|
||||
84E185C6203BEA7900F69BFA /* NSAttributedString+RSCore.h in Headers */,
|
||||
844F91D51D90D86100820C48 /* RSTransparentContainerView.h in Headers */,
|
||||
84CFF53F1AC3CD0100CEA6C8 /* NSMutableSet+RSCore.h in Headers */,
|
||||
84C632A0200D30F1007BEEAA /* NSAppleEventDescriptor+RSCore.h in Headers */,
|
||||
84CFF5121AC3C6D800CEA6C8 /* RSBlocks.h in Headers */,
|
||||
84CFF56D1AC3D20A00CEA6C8 /* NSImage+RSCore.h in Headers */,
|
||||
84CFF5471AC3CD8000CEA6C8 /* NSTimer+RSCore.h in Headers */,
|
||||
84CFF5331AC3CB6800CEA6C8 /* NSDictionary+RSCore.h in Headers */,
|
||||
84CFF54B1AC3CDAC00CEA6C8 /* NSString+RSCore.h in Headers */,
|
||||
84CFF55C1AC3D01F00CEA6C8 /* RSBackgroundColorView.h in Headers */,
|
||||
84CFF5161AC3C73000CEA6C8 /* RSConstants.h in Headers */,
|
||||
84536F661BB856D4001E1639 /* NSFileManager+RSCore.h in Headers */,
|
||||
84CFF52F1AC3CB1900CEA6C8 /* NSDate+RSCore.h in Headers */,
|
||||
8414CBAB1C95F8F700333C12 /* RSGeometry.h in Headers */,
|
||||
845DE0F31B80477100D1571B /* NSSet+RSCore.h in Headers */,
|
||||
84C632A4200D356E007BEEAA /* SendToBlogEditorApp.h in Headers */,
|
||||
844C915B1B65753E0051FC1B /* RSPlist.h in Headers */,
|
||||
8453F7DE1BDF337800B1C8ED /* RSMacroProcessor.h in Headers */,
|
||||
8415CB8A1BF84D24007B1E98 /* NSEvent+RSCore.h in Headers */,
|
||||
849B08971BF7BCE30090CEE4 /* NSPasteboard+RSCore.h in Headers */,
|
||||
84FE9FC31C00453900081CE9 /* NSStoryboard+RSCore.h in Headers */,
|
||||
84CFF5431AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
842DD7BB1E14993900E061EB /* RSCoreiOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 842DD7C11E14993900E061EB /* Build configuration list for PBXNativeTarget "RSCoreiOS" */;
|
||||
buildPhases = (
|
||||
842DD7B71E14993900E061EB /* Sources */,
|
||||
842DD7B81E14993900E061EB /* Frameworks */,
|
||||
842DD7B91E14993900E061EB /* Headers */,
|
||||
842DD7BA1E14993900E061EB /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = RSCoreiOS;
|
||||
productName = RSCoreiOS;
|
||||
productReference = 842DD7BC1E14993900E061EB /* RSCore.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
84CFF4F31AC3C69700CEA6C8 /* RSCore */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 84CFF50A1AC3C69700CEA6C8 /* Build configuration list for PBXNativeTarget "RSCore" */;
|
||||
buildPhases = (
|
||||
84CFF4EF1AC3C69700CEA6C8 /* Sources */,
|
||||
84CFF4F01AC3C69700CEA6C8 /* Frameworks */,
|
||||
84CFF4F11AC3C69700CEA6C8 /* Headers */,
|
||||
84CFF4F21AC3C69700CEA6C8 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = RSCore;
|
||||
productName = RSCore;
|
||||
productReference = 84CFF4F41AC3C69700CEA6C8 /* RSCore.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
84CFF4FE1AC3C69700CEA6C8 /* RSCoreTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 84CFF50D1AC3C69700CEA6C8 /* Build configuration list for PBXNativeTarget "RSCoreTests" */;
|
||||
buildPhases = (
|
||||
84CFF4FB1AC3C69700CEA6C8 /* Sources */,
|
||||
84CFF4FC1AC3C69700CEA6C8 /* Frameworks */,
|
||||
84CFF4FD1AC3C69700CEA6C8 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
84CFF5021AC3C69700CEA6C8 /* PBXTargetDependency */,
|
||||
);
|
||||
name = RSCoreTests;
|
||||
productName = RSCoreTests;
|
||||
productReference = 84CFF4FF1AC3C69700CEA6C8 /* RSCoreTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
84CFF4EB1AC3C69700CEA6C8 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0720;
|
||||
LastUpgradeCheck = 0930;
|
||||
ORGANIZATIONNAME = "Ranchero Software, LLC";
|
||||
TargetAttributes = {
|
||||
842DD7BB1E14993900E061EB = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
DevelopmentTeam = 9C84TZ7Q6Z;
|
||||
LastSwiftMigration = 0820;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
84CFF4F31AC3C69700CEA6C8 = {
|
||||
CreatedOnToolsVersion = 6.2;
|
||||
DevelopmentTeam = 9C84TZ7Q6Z;
|
||||
LastSwiftMigration = 0800;
|
||||
};
|
||||
84CFF4FE1AC3C69700CEA6C8 = {
|
||||
CreatedOnToolsVersion = 6.2;
|
||||
LastSwiftMigration = 0800;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 84CFF4EE1AC3C69700CEA6C8 /* Build configuration list for PBXProject "RSCore" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 84CFF4EA1AC3C69700CEA6C8;
|
||||
productRefGroup = 84CFF4F51AC3C69700CEA6C8 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
84CFF4F31AC3C69700CEA6C8 /* RSCore */,
|
||||
84CFF4FE1AC3C69700CEA6C8 /* RSCoreTests */,
|
||||
842DD7BB1E14993900E061EB /* RSCoreiOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
842DD7BA1E14993900E061EB /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
84CFF4F21AC3C69700CEA6C8 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
84C687301FBAA30800345C9E /* LogWindow.xib in Resources */,
|
||||
8479213C1FBA426B004AD08C /* WebViewWindow.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
84CFF4FD1AC3C69700CEA6C8 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
842DD7B71E14993900E061EB /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
842DD7EB1E14996300E061EB /* NSObject+RSCore.m in Sources */,
|
||||
842DD7F81E14997600E061EB /* RSScaling.m in Sources */,
|
||||
842DD7D01E14995C00E061EB /* RSMacroProcessor.m in Sources */,
|
||||
842DD7E51E14996300E061EB /* NSMutableDictionary+RSCore.m in Sources */,
|
||||
842DD7F41E14996B00E061EB /* Set+Extensions.swift in Sources */,
|
||||
84B99C9B1FAE650100ECDEDB /* OPMLRepresentable.swift in Sources */,
|
||||
842DD7D71E14996300E061EB /* NSArray+RSCore.m in Sources */,
|
||||
842DD7F31E14996B00E061EB /* NSMutableDictionary-Extensions.swift in Sources */,
|
||||
842DD7DF1E14996300E061EB /* NSDictionary+RSCore.m in Sources */,
|
||||
842DD7C81E14995C00E061EB /* RSConstants.m in Sources */,
|
||||
845A29201FC8BC49007B49E3 /* BinaryDiskCache.swift in Sources */,
|
||||
84C687391FBC028900345C9E /* LogItem.swift in Sources */,
|
||||
842DD7E11E14996300E061EB /* NSFileManager+RSCore.m in Sources */,
|
||||
842DD7C61E14995C00E061EB /* RSBlocks.m in Sources */,
|
||||
842DD7DD1E14996300E061EB /* NSDate+RSCore.m in Sources */,
|
||||
84B99C951FAE64D500ECDEDB /* DisplayNameProvider.swift in Sources */,
|
||||
8402047F1FBCE77900D94C1A /* BatchUpdate.swift in Sources */,
|
||||
842DD7E91E14996300E061EB /* NSNotificationCenter+RSCore.m in Sources */,
|
||||
842DD7E71E14996300E061EB /* NSMutableSet+RSCore.m in Sources */,
|
||||
842DD7E31E14996300E061EB /* NSMutableArray+RSCore.m in Sources */,
|
||||
842DD7DB1E14996300E061EB /* NSData+RSCore.m in Sources */,
|
||||
842DD7D51E14995C00E061EB /* PlistProviderProtocol.swift in Sources */,
|
||||
842DD7CE1E14995C00E061EB /* RSPlist.m in Sources */,
|
||||
848F6AEA1FC2BC50002D422E /* ThreadSafeCache.swift in Sources */,
|
||||
842DD7EF1E14996300E061EB /* NSString+RSCore.m in Sources */,
|
||||
842DD7F21E14996B00E061EB /* Date+Extensions.swift in Sources */,
|
||||
842DD7ED1E14996300E061EB /* NSSet+RSCore.m in Sources */,
|
||||
84C687361FBC025600345C9E /* Log.swift in Sources */,
|
||||
842DD7CA1E14995C00E061EB /* RSPlatform.m in Sources */,
|
||||
842DD7D91E14996300E061EB /* NSCalendar+RSCore.m in Sources */,
|
||||
842DD7F11E14996300E061EB /* NSTimer+RSCore.m in Sources */,
|
||||
842DD7F61E14997600E061EB /* RSImageRenderer.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
84CFF4EF1AC3C69700CEA6C8 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8417FE031AC67D430048E9B7 /* RSOpaqueContainerView.m in Sources */,
|
||||
84CFF5481AC3CD8000CEA6C8 /* NSTimer+RSCore.m in Sources */,
|
||||
84FE9FC41C00453900081CE9 /* NSStoryboard+RSCore.m in Sources */,
|
||||
84CFF5341AC3CB6800CEA6C8 /* NSDictionary+RSCore.m in Sources */,
|
||||
84CFF54C1AC3CDAC00CEA6C8 /* NSString+RSCore.m in Sources */,
|
||||
84CFF5171AC3C73000CEA6C8 /* RSConstants.m in Sources */,
|
||||
8432B1881DACA2060057D6DF /* NSWindow-Extensions.swift in Sources */,
|
||||
8402047E1FBCE77900D94C1A /* BatchUpdate.swift in Sources */,
|
||||
84C632A5200D356E007BEEAA /* SendToBlogEditorApp.m in Sources */,
|
||||
84CFF5541AC3CF4700CEA6C8 /* NSColor+RSCore.m in Sources */,
|
||||
84536F671BB856D4001E1639 /* NSFileManager+RSCore.m in Sources */,
|
||||
8415CB8B1BF84D24007B1E98 /* NSEvent+RSCore.m in Sources */,
|
||||
84CFF53C1AC3CCCA00CEA6C8 /* NSMutableDictionary+RSCore.m in Sources */,
|
||||
8414CBAC1C95F8F700333C12 /* RSGeometry.m in Sources */,
|
||||
84134D201C59D5450063FD24 /* NSCalendar+RSCore.m in Sources */,
|
||||
84E185C7203BEA7900F69BFA /* NSAttributedString+RSCore.m in Sources */,
|
||||
84CFF5651AC3D13C00CEA6C8 /* RSImageRenderer.m in Sources */,
|
||||
849EE70D2039187D0082A1EA /* NSWindowController+RSCore.swift in Sources */,
|
||||
84CFF5381AC3CBB200CEA6C8 /* NSMutableArray+RSCore.m in Sources */,
|
||||
84CFF5401AC3CD0100CEA6C8 /* NSMutableSet+RSCore.m in Sources */,
|
||||
84CFF5441AC3CD3500CEA6C8 /* NSNotificationCenter+RSCore.m in Sources */,
|
||||
84CFF55D1AC3D01F00CEA6C8 /* RSBackgroundColorView.m in Sources */,
|
||||
84CFF5131AC3C6D800CEA6C8 /* RSBlocks.m in Sources */,
|
||||
84C687321FBAA3DF00345C9E /* LogWindowController.swift in Sources */,
|
||||
84C687381FBC028900345C9E /* LogItem.swift in Sources */,
|
||||
8432B1861DACA0E90057D6DF /* NSResponder-Extensions.swift in Sources */,
|
||||
849EE72520393AEA0082A1EA /* Array+RSCore.swift in Sources */,
|
||||
84E8E0D9202EC39800562D8F /* NSMenu+Extensions.swift in Sources */,
|
||||
84AD1EA820315BA900BC20B7 /* NSPasteboard+RSCore.swift in Sources */,
|
||||
84D5BA1E201E87E2009092BD /* URLPasteboardWriter.swift in Sources */,
|
||||
849B08981BF7BCE30090CEE4 /* NSPasteboard+RSCore.m in Sources */,
|
||||
842635571D7FA1C800196285 /* NSTableView+Extensions.swift in Sources */,
|
||||
84F20F831F16BA6200D8E682 /* PropertyList.swift in Sources */,
|
||||
84C687351FBC025600345C9E /* Log.swift in Sources */,
|
||||
84CFF5301AC3CB1900CEA6C8 /* NSDate+RSCore.m in Sources */,
|
||||
84CFF5281AC3C9A200CEA6C8 /* NSArray+RSCore.m in Sources */,
|
||||
84C632A1200D30F1007BEEAA /* NSAppleEventDescriptor+RSCore.m in Sources */,
|
||||
84CFF5591AC3CF9100CEA6C8 /* NSView+RSCore.m in Sources */,
|
||||
84CFF56A1AC3D1B000CEA6C8 /* RSScaling.m in Sources */,
|
||||
84FEB4AC1D19D7F4004727E5 /* Date+Extensions.swift in Sources */,
|
||||
8479213E1FBA4285004AD08C /* WebViewWindowController.swift in Sources */,
|
||||
844B5B571FE9D36000C7C76A /* Keyboard.swift in Sources */,
|
||||
8461387F1DB3F5BE00048B83 /* RSToolbarItem.swift in Sources */,
|
||||
84B99C941FAE64D500ECDEDB /* DisplayNameProvider.swift in Sources */,
|
||||
84BB45431D6909C700B48537 /* NSMutableDictionary-Extensions.swift in Sources */,
|
||||
84411E731FE5FFC3004B527F /* NSImage+RSCore.swift in Sources */,
|
||||
845DE0F41B80477100D1571B /* NSSet+RSCore.m in Sources */,
|
||||
842635591D7FA24800196285 /* NSOutlineView+Extensions.swift in Sources */,
|
||||
844C915C1B65753E0051FC1B /* RSPlist.m in Sources */,
|
||||
84CFF5231AC3C89D00CEA6C8 /* NSObject+RSCore.m in Sources */,
|
||||
84AD1EA520315A8800BC20B7 /* PasteboardWriterOwner.swift in Sources */,
|
||||
8414CBA71C95F2EA00333C12 /* Set+Extensions.swift in Sources */,
|
||||
84B99C9A1FAE650100ECDEDB /* OPMLRepresentable.swift in Sources */,
|
||||
84E34DA61F9FA1070077082F /* UndoableCommand.swift in Sources */,
|
||||
844F91D61D90D86100820C48 /* RSTransparentContainerView.m in Sources */,
|
||||
84CFF56E1AC3D20A00CEA6C8 /* NSImage+RSCore.m in Sources */,
|
||||
8453F7DF1BDF337800B1C8ED /* RSMacroProcessor.m in Sources */,
|
||||
84C326872038C9F6006A025C /* CoalescingQueue.swift in Sources */,
|
||||
842E45CC1ED623C7000A8B52 /* UniqueIdentifier.swift in Sources */,
|
||||
849EE72320393A750082A1EA /* NSToolbar+RSCore.swift in Sources */,
|
||||
84A8358A1D4EC7B80004C598 /* PlistProviderProtocol.swift in Sources */,
|
||||
849A339E1AC90A0A0015BA09 /* NSTableView+RSCore.m in Sources */,
|
||||
8434D15C200BD6F400D6281E /* UserApp.swift in Sources */,
|
||||
84CFF51B1AC3C77500CEA6C8 /* RSPlatform.m in Sources */,
|
||||
845A291F1FC8BC49007B49E3 /* BinaryDiskCache.swift in Sources */,
|
||||
84CFF52C1AC3CA9700CEA6C8 /* NSData+RSCore.m in Sources */,
|
||||
848F6AE91FC2BC50002D422E /* ThreadSafeCache.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
84CFF4FB1AC3C69700CEA6C8 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
84B890561C59CF1600D8BF23 /* NSString+ExtrasTests.m in Sources */,
|
||||
84CFF5071AC3C69700CEA6C8 /* RSCoreTests.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
84CFF5021AC3C69700CEA6C8 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 84CFF4F31AC3C69700CEA6C8 /* RSCore */;
|
||||
targetProxy = 84CFF5011AC3C69700CEA6C8 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
842DD7C21E14993900E061EB /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D511EF2A202446E300712EC3 /* RSCore_ios_target_debug.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
842DD7C31E14993900E061EB /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D511EF2B202446E300712EC3 /* RSCore_ios_target_release.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
84CFF5081AC3C69700CEA6C8 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D511EF0120242E4C00712EC3 /* RSCore_project_debug.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
84CFF5091AC3C69700CEA6C8 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D511EF0020242E4C00712EC3 /* RSCore_project_release.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
84CFF50B1AC3C69700CEA6C8 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D511EF2620243B6300712EC3 /* RSCore_mac_target.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
84CFF50C1AC3C69700CEA6C8 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D511EF2620243B6300712EC3 /* RSCore_mac_target.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
84CFF50E1AC3C69700CEA6C8 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D511EEFF20242E4C00712EC3 /* RSCoreTests_target.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
84CFF50F1AC3C69700CEA6C8 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D511EEFF20242E4C00712EC3 /* RSCoreTests_target.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
842DD7C11E14993900E061EB /* Build configuration list for PBXNativeTarget "RSCoreiOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
842DD7C21E14993900E061EB /* Debug */,
|
||||
842DD7C31E14993900E061EB /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
84CFF4EE1AC3C69700CEA6C8 /* Build configuration list for PBXProject "RSCore" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
84CFF5081AC3C69700CEA6C8 /* Debug */,
|
||||
84CFF5091AC3C69700CEA6C8 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
84CFF50A1AC3C69700CEA6C8 /* Build configuration list for PBXNativeTarget "RSCore" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
84CFF50B1AC3C69700CEA6C8 /* Debug */,
|
||||
84CFF50C1AC3C69700CEA6C8 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
84CFF50D1AC3C69700CEA6C8 /* Build configuration list for PBXNativeTarget "RSCoreTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
84CFF50E1AC3C69700CEA6C8 /* Debug */,
|
||||
84CFF50F1AC3C69700CEA6C8 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 84CFF4EB1AC3C69700CEA6C8 /* Project object */;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:RSCore.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13770" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13770"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="LogWindowController" customModule="RSCore" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="textView" destination="cG6-u8-uMj" id="KV1-Ym-Yn7"/>
|
||||
<outlet property="window" destination="QvC-M9-y7g" id="BuO-Xt-18T"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="457" y="982" width="480" height="270"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
|
||||
<value key="minSize" type="size" width="480" height="270"/>
|
||||
<value key="maxSize" type="size" width="2048" height="2048"/>
|
||||
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qkQ-6Y-KmD">
|
||||
<rect key="frame" x="0.0" y="32" width="480" height="238"/>
|
||||
<clipView key="contentView" id="FKH-aI-1be">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="238"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textView importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="cG6-u8-uMj">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="238"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<size key="minSize" width="480" height="238"/>
|
||||
<size key="maxSize" width="481" height="10000000"/>
|
||||
<color key="insertionPointColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</textView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</clipView>
|
||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="Vod-9Z-5Kc">
|
||||
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="QCg-T8-ydO">
|
||||
<rect key="frame" x="464" y="0.0" width="16" height="238"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="quV-wb-dTF">
|
||||
<rect key="frame" x="284" y="3" width="84" height="25"/>
|
||||
<buttonCell key="cell" type="roundTextured" title="Clear" bezelStyle="texturedRounded" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="luW-96-yKD">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="clearContents:" target="-2" id="cZR-Ic-VD0"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Eeo-dn-vtp">
|
||||
<rect key="frame" x="376" y="3" width="84" height="25"/>
|
||||
<buttonCell key="cell" type="roundTextured" title="Save to File" bezelStyle="texturedRounded" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="tTX-36-gJT">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="saveToFile:" target="-2" id="702-Lb-l3d"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cUl-9V-D2b">
|
||||
<rect key="frame" x="173" y="127" width="134" height="17"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="This doesn’t work yet" id="Tuo-hs-CNa">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Eeo-dn-vtp" secondAttribute="trailing" constant="20" symbolic="YES" id="2Ct-CF-MiD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="qkQ-6Y-KmD" secondAttribute="trailing" id="3FZ-jN-K85"/>
|
||||
<constraint firstItem="cUl-9V-D2b" firstAttribute="centerY" secondItem="EiT-Mj-1SZ" secondAttribute="centerY" id="8Nw-Pj-sr0"/>
|
||||
<constraint firstItem="Eeo-dn-vtp" firstAttribute="baseline" secondItem="quV-wb-dTF" secondAttribute="baseline" id="8dT-ag-UwE"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Eeo-dn-vtp" secondAttribute="bottom" constant="5" id="KIn-jy-T6Y"/>
|
||||
<constraint firstAttribute="bottom" secondItem="qkQ-6Y-KmD" secondAttribute="bottom" constant="32" id="NCo-rh-VJo"/>
|
||||
<constraint firstItem="qkQ-6Y-KmD" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" id="T57-rw-GIA"/>
|
||||
<constraint firstItem="Eeo-dn-vtp" firstAttribute="width" secondItem="quV-wb-dTF" secondAttribute="width" id="UVb-RA-1p3"/>
|
||||
<constraint firstItem="cUl-9V-D2b" firstAttribute="centerX" secondItem="EiT-Mj-1SZ" secondAttribute="centerX" id="W0v-k5-Ug2"/>
|
||||
<constraint firstItem="qkQ-6Y-KmD" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" id="lfP-xK-X0J"/>
|
||||
<constraint firstItem="Eeo-dn-vtp" firstAttribute="leading" secondItem="quV-wb-dTF" secondAttribute="trailing" constant="8" symbolic="YES" id="osp-9K-DSB"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<contentBorderThickness minY="32"/>
|
||||
</window>
|
||||
</objects>
|
||||
</document>
|
@ -1,108 +0,0 @@
|
||||
//
|
||||
// LogWindowController.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 11/13/17.
|
||||
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
public class LogWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet private var textView: NSTextView!
|
||||
private var title: String!
|
||||
private weak var log: Log?
|
||||
// private let attributes = [NSFont.Att
|
||||
|
||||
public convenience init(title: String, log: Log) {
|
||||
|
||||
self.init(windowNibName: NSNib.Name(rawValue: "LogWindow"))
|
||||
self.log = log
|
||||
self.title = title
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(logDidAddItem(_:)), name: .LogDidAddItem, object: log)
|
||||
}
|
||||
|
||||
public override func windowDidLoad() {
|
||||
|
||||
window!.title = title
|
||||
addExistingLogItems()
|
||||
}
|
||||
|
||||
// MARK: - Notifications
|
||||
|
||||
@objc func logDidAddItem(_ note: Notification) {
|
||||
|
||||
guard let logItem = note.userInfo?[Log.logItemKey] as? LogItem else {
|
||||
return
|
||||
}
|
||||
|
||||
appendLogItem(logItem)
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@IBAction func clearContents(_ sender: Any?) {
|
||||
|
||||
setTextViewAttributedString(NSAttributedString(string: ""))
|
||||
}
|
||||
|
||||
@IBAction func saveToFile(_ sender: Any?) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private extension LogWindowController {
|
||||
|
||||
func addExistingLogItems() {
|
||||
|
||||
guard let logItems = log?.logItems else {
|
||||
return
|
||||
}
|
||||
|
||||
let attString = NSMutableAttributedString()
|
||||
for logItem in logItems {
|
||||
let oneAttString = attributedString(for: logItem)
|
||||
attString.append(oneAttString)
|
||||
}
|
||||
|
||||
textView.textStorage?.setAttributedString(attString)
|
||||
|
||||
validateButtons()
|
||||
}
|
||||
|
||||
func setTextViewAttributedString(_ attString: NSAttributedString) {
|
||||
|
||||
textView.textStorage?.setAttributedString(attString)
|
||||
validateButtons()
|
||||
}
|
||||
|
||||
func appendAttributedString(_ attString: NSAttributedString) {
|
||||
|
||||
if !Thread.isMainThread {
|
||||
DispatchQueue.main.async {
|
||||
self.appendAttributedString(attString)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
validateButtons()
|
||||
}
|
||||
|
||||
func appendLogItem(_ logItem: LogItem) {
|
||||
|
||||
}
|
||||
|
||||
func attributedString(for logItem: LogItem) -> NSAttributedString {
|
||||
|
||||
return NSAttributedString() //TODO
|
||||
|
||||
}
|
||||
|
||||
func validateButtons() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
//
|
||||
// NSAppleEventDescriptor+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 1/15/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NSAppleEventDescriptor (RSCore)
|
||||
|
||||
+ (NSAppleEventDescriptor * _Nullable)descriptorWithRunningApplication:(NSRunningApplication *)runningApplication;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,23 +0,0 @@
|
||||
//
|
||||
// NSAppleEventDescriptor+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 1/15/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSAppleEventDescriptor+RSCore.h"
|
||||
|
||||
@implementation NSAppleEventDescriptor (RSCore)
|
||||
|
||||
+ (NSAppleEventDescriptor * _Nullable)descriptorWithRunningApplication:(NSRunningApplication *)runningApplication {
|
||||
|
||||
pid_t processIdentifier = runningApplication.processIdentifier;
|
||||
if (processIdentifier == -1) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
return [NSAppleEventDescriptor descriptorWithProcessIdentifier:processIdentifier];
|
||||
}
|
||||
|
||||
@end
|
@ -1,17 +0,0 @@
|
||||
//
|
||||
// NSAttributedString.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 2/19/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
|
||||
@interface NSAttributedString (RSCore)
|
||||
|
||||
// Useful for table/outline views when a row is selected.
|
||||
|
||||
- (NSAttributedString *)rs_attributedStringByMakingTextWhite;
|
||||
|
||||
@end
|
@ -1,20 +0,0 @@
|
||||
//
|
||||
// NSAttributedString.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 2/19/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSAttributedString+RSCore.h"
|
||||
|
||||
@implementation NSAttributedString (RSCore)
|
||||
|
||||
- (NSAttributedString *)rs_attributedStringByMakingTextWhite {
|
||||
|
||||
NSMutableAttributedString *mutableString = [self mutableCopy];
|
||||
[mutableString addAttribute:NSForegroundColorAttributeName value:NSColor.whiteColor range:NSMakeRange(0, mutableString.string.length)];
|
||||
return [mutableString copy];
|
||||
}
|
||||
|
||||
@end
|
@ -1,23 +0,0 @@
|
||||
//
|
||||
// NSMenu+Extensions.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 2/9/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
public extension NSMenu {
|
||||
|
||||
public func takeItems(from menu: NSMenu) {
|
||||
|
||||
// The passed-in menu gets all its items removed.
|
||||
|
||||
let items = menu.items
|
||||
menu.removeAllItems()
|
||||
for menuItem in items {
|
||||
addItem(menuItem)
|
||||
}
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
//
|
||||
// NSPasteboard+RSCore.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 2/11/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
public extension NSPasteboard {
|
||||
|
||||
func copyObjects(_ objects: [Any]) {
|
||||
|
||||
guard let writers = writersFor(objects) else {
|
||||
return
|
||||
}
|
||||
|
||||
clearContents()
|
||||
writeObjects(writers)
|
||||
}
|
||||
|
||||
func canCopyAtLeastOneObject(_ objects: [Any]) -> Bool {
|
||||
|
||||
for object in objects {
|
||||
if object is PasteboardWriterOwner {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
private extension NSPasteboard {
|
||||
|
||||
func writersFor(_ objects: [Any]) -> [NSPasteboardWriting]? {
|
||||
|
||||
let writers = objects.compactMap { ($0 as? PasteboardWriterOwner)?.pasteboardWriter }
|
||||
return writers.isEmpty ? nil : writers
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
//
|
||||
// NSToolbar+RSCore.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 2/17/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
public extension NSToolbar {
|
||||
|
||||
public func existingItem(withIdentifier identifier: NSToolbarItem.Identifier) -> NSToolbarItem? {
|
||||
|
||||
return items.firstElementPassingTest{ $0.itemIdentifier == identifier }
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
//
|
||||
// NSWindowController+RSCore.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 2/17/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
public extension NSWindowController {
|
||||
|
||||
public var isDisplayingSheet: Bool {
|
||||
|
||||
return window?.isDisplayingSheet ?? false
|
||||
}
|
||||
|
||||
public var isOpen: Bool {
|
||||
|
||||
return isWindowLoaded && window!.isVisible
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
//
|
||||
// SendToBlogEditorApp.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 1/15/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
|
||||
// This is for sending articles to MarsEdit and other apps that implement the send-to-blog-editor Apple events API:
|
||||
// http://ranchero.com/netnewswire/developers/externalinterface
|
||||
//
|
||||
// The first parameter is a target descriptor. The easiest way to get this is probably UserApp.targetDescriptor or +[NSAppleEventDescriptor descriptorWithRunningApplication:].
|
||||
// This does not care of launching the app in the first place. See UserApp.swift.
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface SendToBlogEditorApp : NSObject
|
||||
|
||||
- (instancetype)initWithTargetDesciptor:(NSAppleEventDescriptor *)targetDescriptor title:(NSString * _Nullable)title body:(NSString * _Nullable)body summary:(NSString * _Nullable)summary link:(NSString * _Nullable)link permalink:(NSString * _Nullable)permalink subject:(NSString * _Nullable)subject creator:(NSString * _Nullable)creator commentsURL:(NSString * _Nullable)commentsURL guid:(NSString * _Nullable)guid sourceName:(NSString * _Nullable)sourceName sourceHomeURL:(NSString * _Nullable)sourceHomeURL sourceFeedURL:(NSString * _Nullable)sourceFeedURL;
|
||||
|
||||
- (OSStatus)send; // Actually send the Apple event.
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@ -1,113 +0,0 @@
|
||||
//
|
||||
// SendToBlogEditorApp.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 1/15/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SendToBlogEditorApp.h"
|
||||
|
||||
@interface SendToBlogEditorApp()
|
||||
|
||||
@property (nonatomic, readonly) NSAppleEventDescriptor *targetDescriptor;
|
||||
|
||||
@property (nonatomic, nullable, readonly) NSString *title;
|
||||
@property (nonatomic, nullable, readonly) NSString *body;
|
||||
@property (nonatomic, nullable, readonly) NSString *summary;
|
||||
@property (nonatomic, nullable, readonly) NSString *link;
|
||||
@property (nonatomic, nullable, readonly) NSString *permalink;
|
||||
@property (nonatomic, nullable, readonly) NSString *subject;
|
||||
@property (nonatomic, nullable, readonly) NSString *creator;
|
||||
@property (nonatomic, nullable, readonly) NSString *commentsURL;
|
||||
@property (nonatomic, nullable, readonly) NSString *guid;
|
||||
@property (nonatomic, nullable, readonly) NSString *sourceName;
|
||||
@property (nonatomic, nullable, readonly) NSString *sourceHomeURL;
|
||||
@property (nonatomic, nullable, readonly) NSString *sourceFeedURL;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SendToBlogEditorApp
|
||||
|
||||
- (instancetype)initWithTargetDesciptor:(NSAppleEventDescriptor *)targetDescriptor title:(NSString * _Nullable)title body:(NSString * _Nullable)body summary:(NSString * _Nullable)summary link:(NSString * _Nullable)link permalink:(NSString * _Nullable)permalink subject:(NSString * _Nullable)subject creator:(NSString * _Nullable)creator commentsURL:(NSString * _Nullable)commentsURL guid:(NSString * _Nullable)guid sourceName:(NSString * _Nullable)sourceName sourceHomeURL:(NSString * _Nullable)sourceHomeURL sourceFeedURL:(NSString * _Nullable)sourceFeedURL {
|
||||
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
_targetDescriptor = targetDescriptor;
|
||||
_title = title;
|
||||
_body = body;
|
||||
_summary = summary;
|
||||
_link = link;
|
||||
_permalink = permalink;
|
||||
_subject = subject;
|
||||
_creator = creator;
|
||||
_commentsURL = commentsURL;
|
||||
_guid = guid;
|
||||
_sourceName = sourceName;
|
||||
_sourceHomeURL = sourceHomeURL;
|
||||
_sourceFeedURL = sourceFeedURL;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
const AEKeyword EditDataItemAppleEventClass = 'EBlg';
|
||||
const AEKeyword EditDataItemAppleEventID = 'oitm';
|
||||
const AEKeyword DataItemTitle = 'titl';
|
||||
const AEKeyword DataItemDescription = 'desc';
|
||||
const AEKeyword DataItemSummary = 'summ';
|
||||
const AEKeyword DataItemLink = 'link';
|
||||
const AEKeyword DataItemPermalink = 'plnk';
|
||||
const AEKeyword DataItemSubject = 'subj';
|
||||
const AEKeyword DataItemCreator = 'crtr';
|
||||
const AEKeyword DataItemCommentsURL = 'curl';
|
||||
const AEKeyword DataItemGUID = 'guid';
|
||||
const AEKeyword DataItemSourceName = 'snam';
|
||||
const AEKeyword DataItemSourceHomeURL = 'hurl';
|
||||
const AEKeyword DataItemSourceFeedURL = 'furl';
|
||||
|
||||
- (OSStatus)send {
|
||||
|
||||
NSAppleEventDescriptor *appleEvent = [NSAppleEventDescriptor appleEventWithEventClass:EditDataItemAppleEventClass eventID:EditDataItemAppleEventID targetDescriptor:self.targetDescriptor returnID:kAutoGenerateReturnID transactionID:kAnyTransactionID];
|
||||
|
||||
[appleEvent setParamDescriptor:[self paramDescriptor] forKeyword:keyDirectObject];
|
||||
|
||||
return AESendMessage((const AppleEvent *)[appleEvent aeDesc], NULL, kAENoReply | kAECanSwitchLayer | kAEAlwaysInteract, kAEDefaultTimeout);
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (NSAppleEventDescriptor *)paramDescriptor {
|
||||
|
||||
NSAppleEventDescriptor *descriptor = [NSAppleEventDescriptor recordDescriptor];
|
||||
|
||||
[self addToDescriptor:descriptor value:self.title keyword:DataItemTitle];
|
||||
[self addToDescriptor:descriptor value:self.body keyword:DataItemDescription];
|
||||
[self addToDescriptor:descriptor value:self.summary keyword:DataItemSummary];
|
||||
[self addToDescriptor:descriptor value:self.link keyword:DataItemLink];
|
||||
[self addToDescriptor:descriptor value:self.permalink keyword:DataItemPermalink];
|
||||
[self addToDescriptor:descriptor value:self.subject keyword:DataItemSubject];
|
||||
[self addToDescriptor:descriptor value:self.creator keyword:DataItemCreator];
|
||||
[self addToDescriptor:descriptor value:self.commentsURL keyword:DataItemCommentsURL];
|
||||
[self addToDescriptor:descriptor value:self.guid keyword:DataItemGUID];
|
||||
[self addToDescriptor:descriptor value:self.sourceName keyword:DataItemSourceName];
|
||||
[self addToDescriptor:descriptor value:self.sourceHomeURL keyword:DataItemSourceHomeURL];
|
||||
[self addToDescriptor:descriptor value:self.sourceFeedURL keyword:DataItemSourceFeedURL];
|
||||
|
||||
return descriptor;
|
||||
}
|
||||
|
||||
- (void)addToDescriptor:(NSAppleEventDescriptor *)descriptor value:(NSString *)value keyword:(AEKeyword)keyword {
|
||||
|
||||
if (!value) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSAppleEventDescriptor *stringDescriptor = [NSAppleEventDescriptor descriptorWithString:value];
|
||||
[descriptor setDescriptor:stringDescriptor forKeyword:keyword];
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,46 +0,0 @@
|
||||
//
|
||||
// URLPasteboardWriter.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 1/28/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
// Takes a string, not a URL, but writes it as a URL (when possible) and as a String.
|
||||
|
||||
@objc public final class URLPasteboardWriter: NSObject, NSPasteboardWriting {
|
||||
|
||||
let urlString: String
|
||||
|
||||
public init(urlString: String) {
|
||||
|
||||
self.urlString = urlString
|
||||
}
|
||||
|
||||
public class func write(urlString: String, to pasteboard: NSPasteboard) {
|
||||
|
||||
pasteboard.clearContents()
|
||||
let writer = URLPasteboardWriter(urlString: urlString)
|
||||
pasteboard.writeObjects([writer])
|
||||
}
|
||||
|
||||
// MARK: - NSPasteboardWriting
|
||||
|
||||
public func writableTypes(for pasteboard: NSPasteboard) -> [NSPasteboard.PasteboardType] {
|
||||
|
||||
if let _ = URL(string: urlString) {
|
||||
return [.URL, .string]
|
||||
}
|
||||
return [.string]
|
||||
}
|
||||
|
||||
public func pasteboardPropertyList(forType type: NSPasteboard.PasteboardType) -> Any? {
|
||||
|
||||
guard type == .string || type == .URL else {
|
||||
return nil
|
||||
}
|
||||
return urlString
|
||||
}
|
||||
}
|
@ -1,135 +0,0 @@
|
||||
//
|
||||
// UserApp.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 1/14/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
// Represents an app (the type of app mostly found in /Applications.)
|
||||
// The app may or may not be running. It may or may not exist.
|
||||
|
||||
public final class UserApp {
|
||||
|
||||
public let bundleID: String
|
||||
public var icon: NSImage? = nil
|
||||
public var existsOnDisk = false
|
||||
public var path: String? = nil
|
||||
public var runningApplication: NSRunningApplication? = nil
|
||||
|
||||
public var isRunning: Bool {
|
||||
|
||||
updateStatus()
|
||||
if let runningApplication = runningApplication {
|
||||
return !runningApplication.isTerminated
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
public init(bundleID: String) {
|
||||
|
||||
self.bundleID = bundleID
|
||||
updateStatus()
|
||||
}
|
||||
|
||||
public func updateStatus() {
|
||||
|
||||
if let runningApplication = runningApplication, runningApplication.isTerminated {
|
||||
self.runningApplication = nil
|
||||
}
|
||||
|
||||
let runningApplications = NSRunningApplication.runningApplications(withBundleIdentifier: bundleID)
|
||||
for app in runningApplications {
|
||||
if let runningApplication = runningApplication {
|
||||
if app == runningApplication {
|
||||
break
|
||||
}
|
||||
}
|
||||
else {
|
||||
if !app.isTerminated {
|
||||
runningApplication = app
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let runningApplication = runningApplication {
|
||||
existsOnDisk = true
|
||||
icon = runningApplication.icon
|
||||
if let bundleURL = runningApplication.bundleURL {
|
||||
path = bundleURL.path
|
||||
}
|
||||
else {
|
||||
path = NSWorkspace.shared.absolutePathForApplication(withBundleIdentifier: bundleID)
|
||||
}
|
||||
if icon == nil, let path = path {
|
||||
icon = NSWorkspace.shared.icon(forFile: path)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
path = NSWorkspace.shared.absolutePathForApplication(withBundleIdentifier: bundleID)
|
||||
if let path = path {
|
||||
if icon == nil {
|
||||
icon = NSWorkspace.shared.icon(forFile: path)
|
||||
}
|
||||
existsOnDisk = true
|
||||
}
|
||||
else {
|
||||
existsOnDisk = false
|
||||
icon = nil
|
||||
}
|
||||
}
|
||||
|
||||
public func launchIfNeeded() -> Bool {
|
||||
|
||||
// Return true if already running.
|
||||
// Return true if not running and successfully gets launched.
|
||||
|
||||
updateStatus()
|
||||
if isRunning {
|
||||
return true
|
||||
}
|
||||
|
||||
guard existsOnDisk, let path = path else {
|
||||
return false
|
||||
}
|
||||
|
||||
let url = URL(fileURLWithPath: path)
|
||||
if let app = try? NSWorkspace.shared.launchApplication(at: url, options: [.withErrorPresentation], configuration: [:]) {
|
||||
runningApplication = app
|
||||
if app.isFinishedLaunching {
|
||||
return true
|
||||
}
|
||||
Thread.sleep(forTimeInterval: 1.0) // Give the app time to launch. This is ugly.
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
public func bringToFront() -> Bool {
|
||||
|
||||
// Activates the app, ignoring other apps.
|
||||
// Does not automatically launch the app first.
|
||||
|
||||
updateStatus()
|
||||
return runningApplication?.activate(options: [.activateIgnoringOtherApps]) ?? false
|
||||
}
|
||||
|
||||
public func targetDescriptor() -> NSAppleEventDescriptor? {
|
||||
|
||||
// Requires that the app has previously been launched.
|
||||
|
||||
updateStatus()
|
||||
guard let runningApplication = runningApplication, !runningApplication.isTerminated else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return NSAppleEventDescriptor(runningApplication: runningApplication)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13526" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13526"/>
|
||||
<plugIn identifier="com.apple.WebKit2IBPlugin" version="13526"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="WebViewWindowController" customModule="RSCore" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="webview" destination="E6W-Ua-YwP" id="dYj-pg-M6n"/>
|
||||
<outlet property="window" destination="QvC-M9-y7g" id="EnP-ca-jeo"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="206" y="471" width="480" height="270"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
|
||||
<value key="minSize" type="size" width="480" height="270"/>
|
||||
<value key="maxSize" type="size" width="2048" height="2048"/>
|
||||
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<wkWebView wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="E6W-Ua-YwP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
|
||||
<wkWebViewConfiguration key="configuration">
|
||||
<audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
|
||||
<wkPreferences key="preferences"/>
|
||||
</wkWebViewConfiguration>
|
||||
</wkWebView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="E6W-Ua-YwP" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" id="hlG-XK-mDH"/>
|
||||
<constraint firstAttribute="bottom" secondItem="E6W-Ua-YwP" secondAttribute="bottom" id="q8o-nj-5qj"/>
|
||||
<constraint firstAttribute="trailing" secondItem="E6W-Ua-YwP" secondAttribute="trailing" id="s2P-HZ-c08"/>
|
||||
<constraint firstItem="E6W-Ua-YwP" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" id="tcr-Wl-0J1"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</window>
|
||||
</objects>
|
||||
</document>
|
@ -1,39 +0,0 @@
|
||||
//
|
||||
// WebViewWindowController.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 11/13/17.
|
||||
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import WebKit
|
||||
|
||||
public final class WebViewWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet private var webview: WKWebView!
|
||||
private var title: String!
|
||||
|
||||
public convenience init(title: String) {
|
||||
|
||||
self.init(windowNibName: NSNib.Name(rawValue: "WebViewWindow"))
|
||||
self.title = title
|
||||
}
|
||||
|
||||
public override func windowDidLoad() {
|
||||
|
||||
window!.title = title
|
||||
}
|
||||
|
||||
public func displayContents(of path: String) {
|
||||
|
||||
// We assume there might be images, style sheets, etc. contained by the folder that the file appears in, so we get read access to the parent folder.
|
||||
|
||||
let _ = self.window
|
||||
|
||||
let fileURL = URL(fileURLWithPath: path)
|
||||
let folderURL = fileURL.deletingLastPathComponent()
|
||||
|
||||
webview.loadFileURL(fileURL, allowingReadAccessTo: folderURL)
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
//
|
||||
// Array+RSCore.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 2/17/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public extension Array {
|
||||
|
||||
public func firstElementPassingTest( _ test: (Element) -> Bool) -> Element? {
|
||||
|
||||
guard let index = self.index(where: test) else {
|
||||
return nil
|
||||
}
|
||||
return self[index]
|
||||
}
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
//
|
||||
// BatchUpdates.swift
|
||||
// DataModel
|
||||
//
|
||||
// Created by Brent Simmons on 9/12/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public typealias BatchUpdateBlock = () -> Void
|
||||
|
||||
public extension Notification.Name {
|
||||
|
||||
public static let BatchUpdateDidPerform = Notification.Name(rawValue: "BatchUpdateDidPerform")
|
||||
}
|
||||
|
||||
public final class BatchUpdate {
|
||||
|
||||
public static let shared = BatchUpdate()
|
||||
|
||||
private var count = 0
|
||||
|
||||
public var isPerforming: Bool {
|
||||
return count > 0
|
||||
}
|
||||
|
||||
public func perform(_ batchUpdateBlock: BatchUpdateBlock) {
|
||||
|
||||
incrementCount()
|
||||
batchUpdateBlock()
|
||||
decrementCount()
|
||||
}
|
||||
}
|
||||
|
||||
private extension BatchUpdate {
|
||||
|
||||
func incrementCount() {
|
||||
|
||||
count = count + 1
|
||||
}
|
||||
|
||||
func decrementCount() {
|
||||
|
||||
count = count - 1
|
||||
|
||||
if count < 1 {
|
||||
|
||||
if count < 0 {
|
||||
assertionFailure("Expected batch updates count to be 0 or greater.")
|
||||
count = 0
|
||||
}
|
||||
|
||||
count = 0
|
||||
postBatchUpdateDidPerform()
|
||||
}
|
||||
}
|
||||
|
||||
func postBatchUpdateDidPerform() {
|
||||
|
||||
NotificationCenter.default.post(name: .BatchUpdateDidPerform, object: nil, userInfo: nil)
|
||||
}
|
||||
}
|
@ -1,97 +0,0 @@
|
||||
//
|
||||
// BinaryDiskCache.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 11/24/17.
|
||||
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// Thread safety is up to the caller.
|
||||
|
||||
public struct BinaryDiskCache {
|
||||
|
||||
public let folder: String
|
||||
|
||||
public init(folder: String) {
|
||||
|
||||
self.folder = folder
|
||||
}
|
||||
|
||||
public func data(forKey key: String) throws -> Data? {
|
||||
|
||||
let url = urlForKey(key)
|
||||
do {
|
||||
let data = try Data(contentsOf: url)
|
||||
return data
|
||||
}
|
||||
catch {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
public func setData(_ data: Data, forKey key: String) throws {
|
||||
|
||||
let url = urlForKey(key)
|
||||
do {
|
||||
try data.write(to: url)
|
||||
}
|
||||
catch {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
public func deleteData(forKey key: String) throws {
|
||||
|
||||
let url = urlForKey(key)
|
||||
do {
|
||||
try FileManager.default.removeItem(at: url)
|
||||
}
|
||||
catch {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
// subscript doesn’t throw, for cases when you can ignore errors.
|
||||
|
||||
public subscript(_ key: String) -> Data? {
|
||||
|
||||
get {
|
||||
do {
|
||||
return try data(forKey: key)
|
||||
}
|
||||
catch {}
|
||||
return nil
|
||||
}
|
||||
|
||||
set {
|
||||
if let data = newValue {
|
||||
do {
|
||||
try setData(data, forKey: key)
|
||||
}
|
||||
catch {}
|
||||
}
|
||||
else {
|
||||
do {
|
||||
try deleteData(forKey: key)
|
||||
}
|
||||
catch{}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private extension BinaryDiskCache {
|
||||
|
||||
func filePath(forKey key: String) -> String {
|
||||
|
||||
return (folder as NSString).appendingPathComponent(key)
|
||||
}
|
||||
|
||||
func urlForKey(_ key: String) -> URL {
|
||||
|
||||
let f = filePath(forKey: key)
|
||||
return URL(fileURLWithPath: f)
|
||||
}
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
//
|
||||
// CoalescingQueue.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 2/17/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// Use when you want to coalesce calls for something like updating visible table cells.
|
||||
// Calls are uniqued. If you add a call with the same target and selector as a previous call, you’ll just get one call.
|
||||
// Targets are weakly-held. If a target goes to nil, the call is not performed.
|
||||
// The perform date is pushed off every time a call is added.
|
||||
// Calls are FIFO.
|
||||
|
||||
struct QueueCall: Equatable {
|
||||
|
||||
weak var target: AnyObject?
|
||||
let selector: Selector
|
||||
|
||||
init(target: AnyObject, selector: Selector) {
|
||||
|
||||
self.target = target
|
||||
self.selector = selector
|
||||
}
|
||||
|
||||
func perform() {
|
||||
|
||||
let _ = target?.perform(selector)
|
||||
}
|
||||
|
||||
static func ==(lhs: QueueCall, rhs: QueueCall) -> Bool {
|
||||
|
||||
return lhs.target === rhs.target && lhs.selector == rhs.selector
|
||||
}
|
||||
}
|
||||
|
||||
@objc public final class CoalescingQueue: NSObject {
|
||||
|
||||
public static let standard = CoalescingQueue(name: "Standard")
|
||||
public let name: String
|
||||
private let interval: TimeInterval
|
||||
private var timer: Timer? = nil
|
||||
private var calls = [QueueCall]()
|
||||
|
||||
public init(name: String, interval: TimeInterval = 0.05) {
|
||||
|
||||
self.name = name
|
||||
self.interval = interval
|
||||
}
|
||||
|
||||
public func add(_ target: AnyObject, _ selector: Selector) {
|
||||
|
||||
let queueCall = QueueCall(target: target, selector: selector)
|
||||
add(queueCall)
|
||||
}
|
||||
|
||||
@objc func timerDidFire(_ sender: Any?) {
|
||||
|
||||
let callsToMake = calls // Make a copy in case calls are added to the queue while performing calls.
|
||||
resetCalls()
|
||||
callsToMake.forEach { $0.perform() }
|
||||
}
|
||||
}
|
||||
|
||||
private extension CoalescingQueue {
|
||||
|
||||
func add(_ call: QueueCall) {
|
||||
|
||||
restartTimer()
|
||||
|
||||
if !calls.contains(call) {
|
||||
calls.append(call)
|
||||
}
|
||||
}
|
||||
|
||||
func resetCalls() {
|
||||
|
||||
calls = [QueueCall]()
|
||||
}
|
||||
|
||||
func restartTimer() {
|
||||
|
||||
invalidateTimer()
|
||||
timer = Timer.scheduledTimer(timeInterval: interval, target: self, selector: #selector(timerDidFire(_:)), userInfo: nil, repeats: false)
|
||||
}
|
||||
|
||||
func invalidateTimer() {
|
||||
|
||||
if let timer = timer, timer.isValid {
|
||||
timer.invalidate()
|
||||
}
|
||||
timer = nil
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
//
|
||||
// Date+Extensions.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 6/21/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public extension Date {
|
||||
|
||||
// Below are for rough use only — they don't use the calendar.
|
||||
|
||||
public mutating func subtract(days: Int) {
|
||||
|
||||
addTimeInterval(0.0 - timeIntervalWithDays(days))
|
||||
}
|
||||
|
||||
public mutating func add(days: Int) {
|
||||
|
||||
addTimeInterval(timeIntervalWithDays(days))
|
||||
}
|
||||
}
|
||||
|
||||
private func timeIntervalWithDays(_ days: Int) -> TimeInterval {
|
||||
|
||||
return TimeInterval(days * 24 * 60 * 60)
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
//
|
||||
// DisplayNameProviderProtocol.swift
|
||||
// DataModel
|
||||
//
|
||||
// Created by Brent Simmons on 7/28/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Notification.Name {
|
||||
|
||||
public static let DisplayNameDidChange = Notification.Name("DisplayNameDidChange")
|
||||
}
|
||||
|
||||
|
||||
public protocol DisplayNameProvider {
|
||||
|
||||
var nameForDisplay: String { get }
|
||||
}
|
||||
|
||||
public extension DisplayNameProvider {
|
||||
|
||||
func postDisplayNameDidChangeNotification() {
|
||||
|
||||
NotificationCenter.default.post(name: .DisplayNameDidChange, object: self, userInfo: nil)
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
//
|
||||
// NSImage+RSCore.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 12/16/17.
|
||||
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
public extension NSImage {
|
||||
|
||||
public func tinted(with color: NSColor) -> NSImage {
|
||||
|
||||
let image = self.copy() as! NSImage
|
||||
|
||||
image.lockFocus()
|
||||
|
||||
color.set()
|
||||
let rect = NSRect(x: 0, y: 0, width: image.size.width, height: image.size.height)
|
||||
rect.fill(using: .sourceAtop)
|
||||
|
||||
image.unlockFocus()
|
||||
|
||||
image.isTemplate = false
|
||||
return image
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2015 Ranchero Software, LLC. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,152 +0,0 @@
|
||||
//
|
||||
// Keyboard.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 12/19/17.
|
||||
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
// To get, for instance, the keyboard integer value for "\r": "\r".keyboardIntegerValue (returns 13)
|
||||
|
||||
public struct KeyboardConstant {
|
||||
|
||||
public static let lineFeedKey = "\n".keyboardIntegerValue
|
||||
public static let returnKey = "\r".keyboardIntegerValue
|
||||
public static let spaceKey = " ".keyboardIntegerValue
|
||||
}
|
||||
|
||||
public extension String {
|
||||
|
||||
public var keyboardIntegerValue: Int {
|
||||
return Int(utf16[utf16.startIndex])
|
||||
}
|
||||
}
|
||||
|
||||
public struct KeyboardShortcut: Hashable {
|
||||
|
||||
public let key: KeyboardKey
|
||||
public let actionString: String
|
||||
public let hashValue: Int
|
||||
|
||||
public init?(dictionary: [String: Any]) {
|
||||
|
||||
guard let key = KeyboardKey(dictionary: dictionary) else {
|
||||
return nil
|
||||
}
|
||||
guard let actionString = dictionary["action"] as? String else {
|
||||
return nil
|
||||
}
|
||||
|
||||
self.key = key
|
||||
self.actionString = actionString
|
||||
self.hashValue = key.hashValue + self.actionString.hashValue
|
||||
}
|
||||
|
||||
public func perform(with view: NSView) {
|
||||
|
||||
let action = NSSelectorFromString(actionString)
|
||||
NSApplication.shared.sendAction(action, to: nil, from: view)
|
||||
}
|
||||
|
||||
public static func findMatchingShortcut(in shortcuts: Set<KeyboardShortcut>, key: KeyboardKey) -> KeyboardShortcut? {
|
||||
|
||||
for shortcut in shortcuts {
|
||||
if shortcut.key == key {
|
||||
return shortcut
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
public static func ==(lhs: KeyboardShortcut, rhs: KeyboardShortcut) -> Bool {
|
||||
|
||||
return lhs.hashValue == rhs.hashValue && lhs.key == rhs.key && lhs.actionString == rhs.actionString
|
||||
}
|
||||
}
|
||||
|
||||
public struct KeyboardKey: Hashable {
|
||||
|
||||
public let shiftKeyDown: Bool
|
||||
public let optionKeyDown: Bool
|
||||
public let commandKeyDown: Bool
|
||||
public let controlKeyDown: Bool
|
||||
public let integerValue: Int // unmodified character as Int
|
||||
|
||||
public var isModified: Bool {
|
||||
return !shiftKeyDown && !optionKeyDown && !commandKeyDown && !controlKeyDown
|
||||
}
|
||||
|
||||
public var hashValue: Int {
|
||||
return integerValue
|
||||
}
|
||||
|
||||
init(integerValue: Int, shiftKeyDown: Bool, optionKeyDown: Bool, commandKeyDown: Bool, controlKeyDown: Bool) {
|
||||
|
||||
self.integerValue = integerValue
|
||||
|
||||
self.shiftKeyDown = shiftKeyDown
|
||||
self.optionKeyDown = optionKeyDown
|
||||
self.commandKeyDown = commandKeyDown
|
||||
self.controlKeyDown = controlKeyDown
|
||||
}
|
||||
|
||||
public init(with event: NSEvent) {
|
||||
|
||||
let flags = event.modifierFlags
|
||||
let shiftKeyDown = flags.contains(.shift)
|
||||
let optionKeyDown = flags.contains(.option)
|
||||
let commandKeyDown = flags.contains(.command)
|
||||
let controlKeyDown = flags.contains(.control)
|
||||
|
||||
let integerValue = event.charactersIgnoringModifiers?.keyboardIntegerValue ?? 0
|
||||
|
||||
self.init(integerValue: integerValue, shiftKeyDown: shiftKeyDown, optionKeyDown: optionKeyDown, commandKeyDown: commandKeyDown, controlKeyDown: controlKeyDown)
|
||||
}
|
||||
|
||||
|
||||
public init?(dictionary: [String: Any]) {
|
||||
|
||||
guard let s = dictionary["key"] as? String else {
|
||||
return nil
|
||||
}
|
||||
|
||||
var integerValue = 0
|
||||
|
||||
switch(s) {
|
||||
case "[space]":
|
||||
integerValue = " ".keyboardIntegerValue
|
||||
case "[uparrow]":
|
||||
integerValue = NSUpArrowFunctionKey
|
||||
case "[downarrow]":
|
||||
integerValue = NSDownArrowFunctionKey
|
||||
case "[leftarrow]":
|
||||
integerValue = NSLeftArrowFunctionKey
|
||||
case "[rightarrow]":
|
||||
integerValue = NSRightArrowFunctionKey
|
||||
case "[return]":
|
||||
integerValue = NSCarriageReturnCharacter
|
||||
case "[enter]":
|
||||
integerValue = NSEnterCharacter
|
||||
case "[delete]":
|
||||
integerValue = Int(kDeleteKeyCode)
|
||||
case "[deletefunction]":
|
||||
integerValue = NSDeleteFunctionKey
|
||||
default:
|
||||
integerValue = s.keyboardIntegerValue
|
||||
}
|
||||
|
||||
let shiftKeyDown = dictionary["shiftModifier"] as? Bool ?? false
|
||||
let optionKeyDown = dictionary["optionModifier"] as? Bool ?? false
|
||||
let commandKeyDown = dictionary["commandModifier"] as? Bool ?? false
|
||||
let controlKeyDown = dictionary["controlModifier"] as? Bool ?? false
|
||||
|
||||
self.init(integerValue: integerValue, shiftKeyDown: shiftKeyDown, optionKeyDown: optionKeyDown, commandKeyDown: commandKeyDown, controlKeyDown: controlKeyDown)
|
||||
}
|
||||
|
||||
public static func ==(lhs: KeyboardKey, rhs: KeyboardKey) -> Bool {
|
||||
|
||||
return lhs.integerValue == rhs.integerValue && lhs.shiftKeyDown == rhs.shiftKeyDown && lhs.optionKeyDown == rhs.optionKeyDown && lhs.commandKeyDown == rhs.commandKeyDown && lhs.controlKeyDown == rhs.controlKeyDown
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
//
|
||||
// Log.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 11/14/17.
|
||||
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public extension Notification.Name {
|
||||
|
||||
public static let LogDidAddItem = NSNotification.Name("LogDidAddItem")
|
||||
}
|
||||
|
||||
public class Log {
|
||||
|
||||
public var logItems = [LogItem]()
|
||||
public static let logItemKey = "logItem" // userInfo key
|
||||
private let lock = NSLock()
|
||||
|
||||
public init() {
|
||||
// Satisfy compiler
|
||||
}
|
||||
|
||||
public func add(_ logItem: LogItem) {
|
||||
|
||||
lock.lock()
|
||||
logItems += [logItem]
|
||||
lock.unlock()
|
||||
|
||||
NotificationCenter.default.post(name: .LogDidAddItem, object: self, userInfo: [Log.logItemKey: logItem])
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
//
|
||||
// LogItem.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 11/14/17.
|
||||
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct LogItem {
|
||||
|
||||
public enum ItemType {
|
||||
case debug, notification, warning, error
|
||||
}
|
||||
|
||||
public let type: ItemType
|
||||
public let message: String
|
||||
public let date: Date
|
||||
|
||||
public init(type: ItemType, message: String) {
|
||||
|
||||
self.type = type
|
||||
self.message = message
|
||||
self.date = Date()
|
||||
}
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
//
|
||||
// NSArray+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
#import <RSCore/RSBlocks.h>
|
||||
|
||||
|
||||
BOOL RSEqualArrays(NSArray *array1, NSArray *array2); /*Yes if both nil, identical, or equal*/
|
||||
|
||||
|
||||
@interface NSArray (RSCore)
|
||||
|
||||
|
||||
/*Returns nil if out of bounds instead of throwing an exception.*/
|
||||
|
||||
- (id)rs_safeObjectAtIndex:(NSUInteger)anIndex;
|
||||
|
||||
/*Does valueForKey:key. When value isEqual, returns YES.*/
|
||||
|
||||
- (id)rs_firstObjectWhereValueForKey:(NSString *)key equalsValue:(id)value;
|
||||
|
||||
- (id)rs_firstObjectPassingTest:(RSTestBlock)testBlock;
|
||||
|
||||
|
||||
typedef id (^RSMapBlock)(id obj);
|
||||
|
||||
- (NSArray *)rs_map:(RSMapBlock)mapBlock;
|
||||
|
||||
|
||||
typedef BOOL (^RSFilterBlock)(id obj);
|
||||
|
||||
- (NSArray *)rs_filter:(RSFilterBlock)filterBlock;
|
||||
|
||||
|
||||
- (NSArray *)rs_arrayWithCopyOfEachObject;
|
||||
|
||||
|
||||
/*Does [valueForKey:key] on each object and uses that as the key in the dictionary.*/
|
||||
|
||||
- (NSDictionary *)rs_dictionaryUsingKey:(id)key;
|
||||
|
||||
|
||||
@end
|
@ -1,103 +0,0 @@
|
||||
//
|
||||
// NSArray+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSArray+RSCore.h"
|
||||
|
||||
|
||||
BOOL RSEqualArrays(NSArray *array1, NSArray *array2) {
|
||||
|
||||
return array1 == array2 || [array1 isEqualToArray:array2];
|
||||
}
|
||||
|
||||
|
||||
@implementation NSArray (RSCore)
|
||||
|
||||
|
||||
- (id)rs_safeObjectAtIndex:(NSUInteger)ix {
|
||||
|
||||
if (self.count < 1 || ix >= self.count) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
return self[ix];
|
||||
}
|
||||
|
||||
|
||||
- (id)rs_firstObjectWhereValueForKey:(NSString *)key equalsValue:(id)value {
|
||||
|
||||
return [self rs_firstObjectPassingTest:^BOOL(id obj) {
|
||||
return [[obj valueForKey:key] isEqual:value];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (id)rs_firstObjectPassingTest:(RSTestBlock)testBlock {
|
||||
|
||||
for (id oneObject in self) {
|
||||
if (testBlock(oneObject)) {
|
||||
return oneObject;
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (NSArray *)rs_map:(RSMapBlock)mapBlock {
|
||||
|
||||
NSMutableArray *mappedArray = [NSMutableArray new];
|
||||
|
||||
for (id oneObject in self) {
|
||||
|
||||
id objectToAdd = mapBlock(oneObject);
|
||||
if (objectToAdd) {
|
||||
[mappedArray addObject:objectToAdd];
|
||||
}
|
||||
}
|
||||
|
||||
return [mappedArray copy];
|
||||
}
|
||||
|
||||
|
||||
- (NSArray *)rs_filter:(RSFilterBlock)filterBlock {
|
||||
|
||||
NSMutableArray *filteredArray = [NSMutableArray new];
|
||||
|
||||
for (id oneObject in self) {
|
||||
|
||||
if (filterBlock(oneObject)) {
|
||||
[filteredArray addObject:oneObject];
|
||||
}
|
||||
}
|
||||
|
||||
return [filteredArray copy];
|
||||
}
|
||||
|
||||
|
||||
- (NSArray *)rs_arrayWithCopyOfEachObject {
|
||||
|
||||
return [self rs_map:^id(id obj) {
|
||||
return [obj copy];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (NSDictionary *)rs_dictionaryUsingKey:(id)key {
|
||||
|
||||
NSMutableDictionary *d = [NSMutableDictionary new];
|
||||
|
||||
for (id oneObject in self) {
|
||||
|
||||
id oneUniqueID = [oneObject valueForKey:key];
|
||||
d[oneUniqueID] = oneObject;
|
||||
}
|
||||
|
||||
return [d copy];
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,22 +0,0 @@
|
||||
//
|
||||
// NSCalendar+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 1/27/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NSCalendar (RSCore)
|
||||
|
||||
+ (NSCalendar *)rs_cachedCalendar;
|
||||
+ (BOOL)rs_dateIsToday:(NSDate *)d;
|
||||
+ (NSDate *)rs_startOfToday NS_SWIFT_NAME(startOfToday());
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@ -1,81 +0,0 @@
|
||||
//
|
||||
// NSCalendar+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 1/27/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
#import "NSCalendar+RSCore.h"
|
||||
#if TARGET_OS_IPHONE
|
||||
@import UIKit;
|
||||
#else
|
||||
@import AppKit;
|
||||
#endif
|
||||
|
||||
@implementation NSCalendar (RSCore)
|
||||
|
||||
static NSCalendar *cachedCalendar = nil;
|
||||
|
||||
+ (NSCalendar *)rs_cachedCalendar {
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
|
||||
cachedCalendar = [NSCalendar autoupdatingCurrentCalendar];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(rs_significantTimeChange:) name:NSSystemTimeZoneDidChangeNotification object:nil];
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(rs_significantTimeChange:) name:UIApplicationDidBecomeActiveNotification object:nil];
|
||||
#else
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(rs_significantTimeChange:) name:NSApplicationDidBecomeActiveNotification object:nil];
|
||||
#endif
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(rs_significantTimeChange:) name:NSCalendarDayChangedNotification object:nil];
|
||||
});
|
||||
|
||||
NSLock *lock = [self rs_cachedCalendarLock];
|
||||
[lock lock];
|
||||
NSCalendar *calendar = cachedCalendar;
|
||||
[lock unlock];
|
||||
|
||||
return calendar;
|
||||
}
|
||||
|
||||
|
||||
+ (void)rs_significantTimeChange:(NSNotification *)note {
|
||||
|
||||
#pragma unused(note)
|
||||
|
||||
NSLock *lock = [self rs_cachedCalendarLock];
|
||||
[lock lock];
|
||||
cachedCalendar = [NSCalendar autoupdatingCurrentCalendar];
|
||||
[lock unlock];
|
||||
}
|
||||
|
||||
+ (NSLock *)rs_cachedCalendarLock {
|
||||
|
||||
static NSLock *lock = nil;
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
lock = [[NSLock alloc] init];
|
||||
});
|
||||
|
||||
return lock;
|
||||
}
|
||||
|
||||
|
||||
+ (BOOL)rs_dateIsToday:(NSDate *)d {
|
||||
|
||||
return [[self rs_cachedCalendar] isDateInToday:d];
|
||||
}
|
||||
|
||||
|
||||
+ (NSDate *)rs_startOfToday {
|
||||
|
||||
return [[self rs_cachedCalendar] startOfDayForDate:[NSDate date]];
|
||||
}
|
||||
|
||||
@end
|
@ -1,18 +0,0 @@
|
||||
//
|
||||
// NSColor+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
|
||||
|
||||
@interface NSColor (RSCore)
|
||||
|
||||
|
||||
+ (NSColor *)rs_colorWithHexString:(NSString *)hexString;
|
||||
|
||||
|
||||
@end
|
@ -1,24 +0,0 @@
|
||||
//
|
||||
// NSColor+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSColor+RSCore.h"
|
||||
#import "NSString+RSCore.h"
|
||||
|
||||
|
||||
@implementation NSColor (RSCore)
|
||||
|
||||
|
||||
+ (NSColor *)rs_colorWithHexString:(NSString *)hexString {
|
||||
|
||||
RSRGBAComponents components = [hexString rs_rgbaComponents];
|
||||
|
||||
return [NSColor colorWithRed:components.red green:components.green blue:components.blue alpha:components.alpha];
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,37 +0,0 @@
|
||||
//
|
||||
// NSData+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
|
||||
BOOL RSEqualBytes(const void *bytes1, const void *bytes2, size_t length);
|
||||
|
||||
NSString *RSHexadecimalStringWithBytes(const unsigned char *bytes, NSUInteger numberOfBytes);
|
||||
|
||||
|
||||
@interface NSData (RSCore)
|
||||
|
||||
- (NSData *)rs_md5Hash;
|
||||
- (NSString *)rs_md5HashString;
|
||||
|
||||
- (BOOL)rs_dataIsPNG;
|
||||
- (BOOL)rs_dataIsGIF;
|
||||
- (BOOL)rs_dataIsJPEG;
|
||||
- (BOOL)rs_dataIsImage;
|
||||
|
||||
- (BOOL)rs_dataIsProbablyHTML;
|
||||
|
||||
- (BOOL)rs_dataBeginsWithBytes:(const void *)bytes length:(size_t)numberOfBytes;
|
||||
|
||||
- (NSString *)rs_noCopyString; //This data object must out-live returned string. May return nil.
|
||||
|
||||
/*If bytes are deadbeef, then string is @"deadbeef". Returns nil for empty data.*/
|
||||
|
||||
- (NSString *)rs_hexadecimalString;
|
||||
|
||||
@end
|
@ -1,153 +0,0 @@
|
||||
//
|
||||
// NSData+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import <CommonCrypto/CommonDigest.h>
|
||||
#import "NSData+RSCore.h"
|
||||
|
||||
|
||||
@implementation NSData (RSCore)
|
||||
|
||||
|
||||
- (NSData *)rs_md5Hash {
|
||||
|
||||
unsigned char hash[CC_MD5_DIGEST_LENGTH];
|
||||
CC_MD5([self bytes], (CC_LONG)[self length], hash);
|
||||
|
||||
return [NSData dataWithBytes:(const void *)hash length:CC_MD5_DIGEST_LENGTH];
|
||||
}
|
||||
|
||||
- (NSString *)rs_md5HashString {
|
||||
|
||||
NSData *d = [self rs_md5Hash];
|
||||
return [d rs_hexadecimalString];
|
||||
}
|
||||
|
||||
BOOL RSEqualBytes(const void *bytes1, const void *bytes2, size_t length) {
|
||||
|
||||
return memcmp(bytes1, bytes2, length) == 0;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_dataBeginsWithBytes:(const void *)bytes length:(size_t)numberOfBytes {
|
||||
|
||||
if ([self length] < numberOfBytes) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
return RSEqualBytes([self bytes], bytes, numberOfBytes);
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_dataIsPNG {
|
||||
|
||||
/* http://www.w3.org/TR/PNG/#5PNG-file-signature : "The first eight bytes of a PNG datastream always contain the following (decimal) values: 137 80 78 71 13 10 26 10" */
|
||||
|
||||
static const Byte pngHeader[] = {137, 'P', 'N', 'G', 13, 10, 26, 10};
|
||||
return [self rs_dataBeginsWithBytes:pngHeader length:sizeof(pngHeader)];
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_dataIsGIF {
|
||||
|
||||
/* http://www.onicos.com/staff/iz/formats/gif.html */
|
||||
|
||||
static const Byte gifHeader1[] = {'G', 'I', 'F', '8', '7', 'a'};
|
||||
if ([self rs_dataBeginsWithBytes:gifHeader1 length:sizeof(gifHeader1)]) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
static const Byte gifHeader2[] = {'G', 'I', 'F', '8', '9', 'a'};
|
||||
return [self rs_dataBeginsWithBytes:gifHeader2 length:sizeof(gifHeader2)];
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_dataIsJPEG {
|
||||
|
||||
const void *bytes = [self bytes];
|
||||
|
||||
static const Byte jpegHeader1[] = {'J', 'F', 'I', 'F'};
|
||||
|
||||
if (RSEqualBytes(bytes + 6, jpegHeader1, sizeof(jpegHeader1))) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
static const Byte jpegHeader2[] = {'E', 'x', 'i', 'f'};
|
||||
return RSEqualBytes(bytes + 6, jpegHeader2, sizeof(jpegHeader2));
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_dataIsImage {
|
||||
|
||||
return [self rs_dataIsPNG] || [self rs_dataIsJPEG] || [self rs_dataIsGIF];
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_dataIsProbablyHTML {
|
||||
|
||||
NSString *s = [self rs_noCopyString];
|
||||
if (!s) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (![s containsString:@">"] || ![s containsString:@">"]) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
for (NSString *oneString in @[@"html", @"body"]) {
|
||||
NSRange range = [s rangeOfString:oneString options:NSCaseInsensitiveSearch];
|
||||
if (range.location == NSNotFound) {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_noCopyString {
|
||||
|
||||
NSDictionary *options = @{NSStringEncodingDetectionSuggestedEncodingsKey : @[@(NSUTF8StringEncoding)]};
|
||||
BOOL usedLossyConversion = NO;
|
||||
NSStringEncoding encoding = [NSString stringEncodingForData:self encodingOptions:options convertedString:nil usedLossyConversion:&usedLossyConversion];
|
||||
if (encoding == 0) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
return [[NSString alloc] initWithBytesNoCopy:(void *)self.bytes length:self.length encoding:encoding freeWhenDone:NO];
|
||||
}
|
||||
|
||||
|
||||
NSString *RSHexadecimalStringWithBytes(const Byte *bytes, NSUInteger numberOfBytes) {
|
||||
|
||||
if (numberOfBytes < 1) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
if (numberOfBytes == 16) {
|
||||
// Common case — MD5 hash, for example.
|
||||
return [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7], bytes[8], bytes[9], bytes[10], bytes[11], bytes[12], bytes[13], bytes[14], bytes[15]];
|
||||
}
|
||||
|
||||
NSMutableString *s = [[NSMutableString alloc] initWithString:@""];
|
||||
NSUInteger i = 0;
|
||||
|
||||
for (i = 0; i < numberOfBytes; i++) {
|
||||
[s appendString:[NSString stringWithFormat:@"%02x", bytes[i]]];
|
||||
}
|
||||
|
||||
return [s copy];
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_hexadecimalString {
|
||||
|
||||
return RSHexadecimalStringWithBytes([self bytes], [self length]);
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,24 +0,0 @@
|
||||
//
|
||||
// NSDate+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
@interface NSDate (RSCore)
|
||||
|
||||
|
||||
- (NSString *)rs_unixTimestampStringWithNoDecimal;
|
||||
|
||||
- (NSString *)rs_iso8601DateString;
|
||||
|
||||
|
||||
/*Not intended for calendar-perfect use.*/
|
||||
|
||||
+ (NSDate *)rs_dateWithNumberOfDaysInThePast:(NSUInteger)numberOfDays;
|
||||
|
||||
|
||||
@end
|
@ -1,49 +0,0 @@
|
||||
//
|
||||
// NSDate+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSDate+RSCore.h"
|
||||
|
||||
@implementation NSDate (RSCore)
|
||||
|
||||
|
||||
- (NSString *)rs_unixTimestampStringWithNoDecimal {
|
||||
return [NSString stringWithFormat:@"%.0f", [self timeIntervalSince1970]]; /*%.0f means no decimal*/
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_iso8601DateString {
|
||||
|
||||
/*NSDateFormatters are not thread-safe.*/
|
||||
|
||||
static NSDateFormatter *dateFormatter = nil;
|
||||
static NSLock *lock = nil;
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
lock = [[NSLock alloc] init];
|
||||
dateFormatter = [NSDateFormatter new];
|
||||
NSLocale *enUSPOSIXLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
|
||||
[dateFormatter setLocale:enUSPOSIXLocale];
|
||||
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"];
|
||||
});
|
||||
|
||||
[lock lock];
|
||||
NSString *dateString = [dateFormatter stringFromDate:self];
|
||||
[lock unlock];
|
||||
|
||||
return dateString;
|
||||
}
|
||||
|
||||
|
||||
+ (NSDate *)rs_dateWithNumberOfDaysInThePast:(NSUInteger)numberOfDays {
|
||||
|
||||
NSTimeInterval timeInterval = 60 * 60 * 24 * numberOfDays;
|
||||
return [NSDate dateWithTimeIntervalSinceNow:-timeInterval];
|
||||
}
|
||||
|
||||
@end
|
@ -1,21 +0,0 @@
|
||||
//
|
||||
// NSDictionary+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
@interface NSDictionary (RSCore)
|
||||
|
||||
/*Keys that aren't strings are ignored. No coercion.*/
|
||||
|
||||
- (id)rs_objectForCaseInsensitiveKey:(NSString *)key;
|
||||
|
||||
- (BOOL)rs_boolForKey:(NSString *)key; /*NO if doesn't exist.*/
|
||||
|
||||
- (int64_t)rs_int64ForKey:(NSString *)key; /*0 if doesn't exist.*/
|
||||
|
||||
@end
|
@ -1,59 +0,0 @@
|
||||
//
|
||||
// NSDictionary+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSDictionary+RSCore.h"
|
||||
|
||||
@implementation NSDictionary (RSCore)
|
||||
|
||||
|
||||
- (id)rs_objectForCaseInsensitiveKey:(NSString *)key {
|
||||
|
||||
id obj = self[key];
|
||||
if (obj) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
for (NSString *oneKey in self.allKeys) {
|
||||
|
||||
if ([oneKey isKindOfClass:[NSString class]] && [key caseInsensitiveCompare:oneKey] == NSOrderedSame) {
|
||||
return self[oneKey];
|
||||
}
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_boolForKey:(NSString *)key {
|
||||
|
||||
id obj = self[key];
|
||||
|
||||
if ([obj respondsToSelector:@selector(boolValue)]) {
|
||||
return [obj boolValue];
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
- (int64_t)rs_int64ForKey:(NSString *)key {
|
||||
|
||||
id obj = self[key];
|
||||
if (!obj) {
|
||||
return 0LL;
|
||||
}
|
||||
|
||||
if ([obj respondsToSelector:@selector(longLongValue)]) {
|
||||
return ((NSNumber *)(obj)).longLongValue;
|
||||
}
|
||||
|
||||
return 0LL;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,27 +0,0 @@
|
||||
//
|
||||
// NSEvent+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 11/14/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
extern unichar kDeleteKeyCode;
|
||||
|
||||
@interface NSEvent (RSCore)
|
||||
|
||||
- (void)rs_getCommandKeyDown:(BOOL *)commandKeyDown optionKeyDown:(BOOL *)optionKeyDown controlKeyDown:(BOOL *)controlKeyDown shiftKeyDown:(BOOL *)shiftKeyDown;
|
||||
|
||||
- (BOOL)rs_keyIsModified;
|
||||
|
||||
- (unichar)rs_unmodifiedCharacter; //The one and only key pressed, if just one. NSNotFound otherwise.
|
||||
|
||||
- (nullable NSString *)rs_unmodifiedCharacterString; // The one and only key, if just one.
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,63 +0,0 @@
|
||||
//
|
||||
// NSEvent+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 11/14/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSEvent+RSCore.h"
|
||||
#import "NSString+RSCore.h"
|
||||
|
||||
|
||||
unichar kDeleteKeyCode = 127;
|
||||
|
||||
@implementation NSEvent (RSCore)
|
||||
|
||||
|
||||
- (void)rs_getCommandKeyDown:(BOOL *)commandKeyDown optionKeyDown:(BOOL *)optionKeyDown controlKeyDown:(BOOL *)controlKeyDown shiftKeyDown:(BOOL *)shiftKeyDown {
|
||||
|
||||
NSEventModifierFlags flags = self.modifierFlags;
|
||||
|
||||
*shiftKeyDown = ((flags & NSEventModifierFlagShift) != 0);
|
||||
*optionKeyDown = ((flags & NSEventModifierFlagOption) != 0);
|
||||
*commandKeyDown = ((flags & NSEventModifierFlagCommand) != 0);
|
||||
*controlKeyDown = ((flags & NSEventModifierFlagControl) != 0);
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_keyIsModified {
|
||||
|
||||
BOOL commandKeyDown = NO;
|
||||
BOOL optionKeyDown = NO;
|
||||
BOOL controlKeyDown = NO;
|
||||
BOOL shiftKeyDown = NO;
|
||||
|
||||
[self rs_getCommandKeyDown:&commandKeyDown optionKeyDown:&optionKeyDown controlKeyDown:&controlKeyDown shiftKeyDown:&shiftKeyDown];
|
||||
|
||||
return commandKeyDown || optionKeyDown || controlKeyDown || shiftKeyDown;
|
||||
}
|
||||
|
||||
|
||||
- (unichar)rs_unmodifiedCharacter {
|
||||
|
||||
NSString *s = self.charactersIgnoringModifiers;
|
||||
if (RSStringIsEmpty(s) || s.length > 1) {
|
||||
return (unichar)NSNotFound;
|
||||
}
|
||||
|
||||
return [s characterAtIndex:0];
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_unmodifiedCharacterString {
|
||||
|
||||
NSString *s = self.charactersIgnoringModifiers;
|
||||
if (RSStringIsEmpty(s) || s.length > 1) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@end
|
@ -1,24 +0,0 @@
|
||||
//
|
||||
// NSFileManager+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 9/27/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NSFileManager (RSCore)
|
||||
|
||||
- (BOOL)rs_copyFilesInFolder:(NSString *)source destination:(NSString *)destination error:(NSError * _Nullable * _Nullable)error;
|
||||
|
||||
- (NSArray<NSString *> *)rs_filenamesInFolder:(NSString *)folder;
|
||||
- (NSArray<NSString *> *)rs_filepathsInFolder:(NSString *)folder;
|
||||
|
||||
- (BOOL)rs_fileIsFolder:(NSString *)f; // Returns NO if file doesn't exist.
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,134 +0,0 @@
|
||||
//
|
||||
// NSFileManager+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 9/27/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSFileManager+RSCore.h"
|
||||
|
||||
|
||||
static BOOL fileExists(NSString *f) {
|
||||
|
||||
NSCParameterAssert(f);
|
||||
return f && [[NSFileManager defaultManager] fileExistsAtPath:f];
|
||||
}
|
||||
|
||||
static BOOL fileIsFolder(NSString *f) {
|
||||
|
||||
NSCParameterAssert(f);
|
||||
BOOL isFolder = NO;
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:f isDirectory:&isFolder]) {
|
||||
return NO;
|
||||
}
|
||||
return isFolder;
|
||||
}
|
||||
|
||||
static BOOL deleteFile(NSString *f, NSError **error) {
|
||||
|
||||
NSCParameterAssert(f);
|
||||
NSCAssert(fileExists, f);
|
||||
|
||||
if (!f || !fileExists(f)) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
return [[NSFileManager defaultManager] removeItemAtPath:f error:error];
|
||||
}
|
||||
|
||||
static BOOL copyFile(NSString *source, NSString *dest, BOOL overwriteIfNecessary, NSError **error) {
|
||||
|
||||
NSCParameterAssert(source);
|
||||
NSCParameterAssert(dest);
|
||||
NSCAssert(fileExists(source), nil);
|
||||
|
||||
if (!dest || !source || !fileExists(source)) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (fileExists(dest)) {
|
||||
if (overwriteIfNecessary) {
|
||||
deleteFile(dest, error);
|
||||
}
|
||||
else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return [[NSFileManager defaultManager] copyItemAtPath:source toPath:dest error:error];
|
||||
}
|
||||
|
||||
@implementation NSFileManager (RSCore)
|
||||
|
||||
|
||||
- (BOOL)rs_copyFilesInFolder:(NSString *)source destination:(NSString *)destination error:(NSError **)error {
|
||||
|
||||
NSAssert(fileIsFolder(source), nil);
|
||||
NSAssert(fileIsFolder(destination), nil);
|
||||
|
||||
if (!fileIsFolder(source) || !fileIsFolder(destination)) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSArray *filenames = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:source error:error];
|
||||
if (!filenames) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
for (NSString *oneFilename in filenames) {
|
||||
|
||||
if ([oneFilename hasPrefix:@"."]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
NSString *sourceFile = [source stringByAppendingPathComponent:oneFilename];
|
||||
NSString *destFile = [destination stringByAppendingPathComponent:oneFilename];
|
||||
|
||||
if (!copyFile(sourceFile, destFile, YES, error)) {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
- (NSArray *)rs_filenamesInFolder:(NSString *)folder {
|
||||
|
||||
NSParameterAssert(folder);
|
||||
NSAssert(fileIsFolder(folder), nil);
|
||||
|
||||
if (!folder || !fileIsFolder(folder)) {
|
||||
return @[];
|
||||
}
|
||||
|
||||
return [[NSFileManager defaultManager] contentsOfDirectoryAtPath:folder error:nil];
|
||||
}
|
||||
|
||||
|
||||
- (NSArray *)rs_filepathsInFolder:(NSString *)folder {
|
||||
|
||||
NSArray *filenames = [self rs_filenamesInFolder:folder];
|
||||
if (!filenames) {
|
||||
return @[];
|
||||
}
|
||||
|
||||
NSMutableArray *filepaths = [NSMutableArray new];
|
||||
for (NSString *oneFilename in filenames) {
|
||||
|
||||
NSString *onePath = [oneFilename stringByAppendingPathComponent:oneFilename];
|
||||
[filepaths addObject:onePath];
|
||||
}
|
||||
|
||||
return filepaths;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_fileIsFolder:(NSString *)f {
|
||||
|
||||
return fileIsFolder(f);
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -1,23 +0,0 @@
|
||||
//
|
||||
// NSImage+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
#import "RSBlocks.h"
|
||||
|
||||
|
||||
@interface NSImage (RSCore)
|
||||
|
||||
|
||||
/*Calls -initWithData in background queue. data and imageResultBlock must be non-nil.*/
|
||||
|
||||
+ (void)rs_imageWithData:(NSData *)data imageResultBlock:(RSImageResultBlock)imageResultBlock;
|
||||
|
||||
+ (instancetype)imageWithContentsOfFile:(NSString *)f;
|
||||
|
||||
|
||||
@end
|
@ -1,32 +0,0 @@
|
||||
//
|
||||
// NSImage+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSImage+RSCore.h"
|
||||
|
||||
|
||||
@implementation NSImage (RSCore)
|
||||
|
||||
|
||||
+ (void)rs_imageWithData:(NSData *)data imageResultBlock:(RSImageResultBlock)imageResultBlock {
|
||||
|
||||
NSParameterAssert(data != nil);
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{
|
||||
NSImage *image = [[NSImage alloc] initWithData:data];
|
||||
RSCallBlockWithParameter(imageResultBlock, image);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+ (instancetype)imageWithContentsOfFile:(NSString *)f {
|
||||
|
||||
return [[self alloc] initWithContentsOfFile:f];
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,19 +0,0 @@
|
||||
//
|
||||
// NSMutableArray+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
@interface NSMutableArray (RSCore)
|
||||
|
||||
|
||||
/*Does nothing if obj == nil. No exception thrown.*/
|
||||
|
||||
- (void)rs_safeAddObject:(id)obj;
|
||||
|
||||
|
||||
@end
|
@ -1,22 +0,0 @@
|
||||
//
|
||||
// NSMutableArray+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSMutableArray+RSCore.h"
|
||||
|
||||
|
||||
@implementation NSMutableArray (RSCore)
|
||||
|
||||
|
||||
- (void)rs_safeAddObject:(id)obj {
|
||||
if (obj != nil) {
|
||||
[self addObject:obj];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,22 +0,0 @@
|
||||
//
|
||||
// NSMutableDictionary+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
|
||||
@interface NSMutableDictionary (RSCore)
|
||||
|
||||
|
||||
/*If obj or key are nil, does nothing. No exception thrown.*/
|
||||
|
||||
- (void)rs_safeSetObject:(id)obj forKey:(id)key;
|
||||
|
||||
- (void)rs_removeObjectsForKeys:(NSArray *)keys;
|
||||
|
||||
|
||||
@end
|
@ -1,28 +0,0 @@
|
||||
//
|
||||
// NSMutableDictionary+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSMutableDictionary+RSCore.h"
|
||||
|
||||
|
||||
@implementation NSMutableDictionary (RSCore)
|
||||
|
||||
|
||||
- (void)rs_safeSetObject:(id)obj forKey:(id)key {
|
||||
if (obj != nil & key != nil) {
|
||||
[self setObject:obj forKey:key];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)rs_removeObjectsForKeys:(NSArray *)keys {
|
||||
|
||||
for (id oneKey in keys) {
|
||||
[self removeObjectForKey:oneKey];
|
||||
}
|
||||
}
|
||||
@end
|
@ -1,24 +0,0 @@
|
||||
//
|
||||
// NSMutableDictionary-Extensions.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 8/20/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public extension NSMutableDictionary {
|
||||
|
||||
public func setOptionalStringValue(_ stringValue: String?, _ key: String) {
|
||||
|
||||
if let s = stringValue {
|
||||
setObjectWithStringKey(s as NSString, key)
|
||||
}
|
||||
}
|
||||
|
||||
public func setObjectWithStringKey(_ obj: Any, _ key: String) {
|
||||
|
||||
setObject(obj, forKey: key as NSString)
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
//
|
||||
// NSMutableSet+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
|
||||
@interface NSMutableSet (RSCore)
|
||||
|
||||
|
||||
/*Does nothing if obj == nil. No exception thrown.*/
|
||||
|
||||
- (void)rs_safeAddObject:(id)obj;
|
||||
|
||||
|
||||
@end
|
@ -1,22 +0,0 @@
|
||||
//
|
||||
// NSMutableSet+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSMutableSet+RSCore.h"
|
||||
|
||||
|
||||
@implementation NSMutableSet (RSCore)
|
||||
|
||||
|
||||
- (void)rs_safeAddObject:(id)obj {
|
||||
if (obj != nil) {
|
||||
[self addObject:obj];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,20 +0,0 @@
|
||||
//
|
||||
// NSNotificationCenter+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
|
||||
@interface NSNotificationCenter (RSCore)
|
||||
|
||||
|
||||
/*Posts immediately if already on the main thread.*/
|
||||
|
||||
- (void)rs_postNotificationNameOnMainThread:(NSString *)notificationName object:(id)obj userInfo:(NSDictionary *)userInfo;
|
||||
|
||||
|
||||
@end
|
@ -1,31 +0,0 @@
|
||||
//
|
||||
// NSNotificationCenter+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSNotificationCenter+RSCore.h"
|
||||
|
||||
|
||||
@implementation NSNotificationCenter (RSCore)
|
||||
|
||||
|
||||
- (void)rs_postNotificationNameOnMainThread:(NSString *)notificationName object:(id)obj userInfo:(NSDictionary *)userInfo {
|
||||
|
||||
if (![NSThread isMainThread]) {
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
||||
[self postNotificationName:notificationName object:obj userInfo:userInfo];
|
||||
});
|
||||
}
|
||||
|
||||
else {
|
||||
[self postNotificationName:notificationName object:obj userInfo:userInfo];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,31 +0,0 @@
|
||||
//
|
||||
// NSObject+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
|
||||
BOOL RSIsNil(id __nullable obj); // YES if nil or NSNull.
|
||||
|
||||
BOOL RSIsEmpty(id __nullable obj); /*YES if nil or NSNull -- or length or count < 1*/
|
||||
|
||||
BOOL RSEqualValues(id __nullable obj1, id __nullable obj2); // YES if both are nil or NSNull or isEqual: returns YES.
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NSObject (RSCore)
|
||||
|
||||
|
||||
- (void)rs_takeValuesFromObject:(id)object propertyNames:(NSArray *)propertyNames;
|
||||
|
||||
- (NSDictionary *)rs_mergeValuesWithObjectReturningChanges:(id)object propertyNames:(NSArray <NSString *>*)propertyNames;
|
||||
|
||||
- (NSDictionary *)rs_dictionaryOfNonNilValues:(NSArray *)propertyNames;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,107 +0,0 @@
|
||||
//
|
||||
// NSObject+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSObject+RSCore.h"
|
||||
|
||||
|
||||
BOOL RSIsNil(id obj) {
|
||||
|
||||
return obj == nil || obj == [NSNull null];
|
||||
}
|
||||
|
||||
BOOL RSIsEmpty(id obj) {
|
||||
|
||||
if (RSIsNil(obj)) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
if ([obj respondsToSelector:@selector(count)]) {
|
||||
return [obj count] < 1;
|
||||
}
|
||||
|
||||
if ([obj respondsToSelector:@selector(length)]) {
|
||||
return [obj length] < 1;
|
||||
}
|
||||
|
||||
return NO; /*Shouldn't get here very often.*/
|
||||
}
|
||||
|
||||
|
||||
BOOL RSEqualValues(id obj1, id obj2) {
|
||||
|
||||
BOOL obj1IsNil = RSIsNil(obj1);
|
||||
BOOL obj2IsNil = RSIsNil(obj2);
|
||||
|
||||
if (obj1IsNil && obj2IsNil) {
|
||||
return YES;
|
||||
}
|
||||
if (obj1IsNil != obj2IsNil) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
return [obj1 isEqual:obj2];
|
||||
}
|
||||
|
||||
|
||||
@implementation NSObject (RSCore)
|
||||
|
||||
- (void)rs_takeValuesFromObject:(id)object propertyNames:(NSArray *)propertyNames {
|
||||
|
||||
for (NSString *onePropertyName in propertyNames) {
|
||||
|
||||
id oneValue = [object valueForKey:onePropertyName];
|
||||
if (oneValue == (id)[NSNull null]) {
|
||||
[self setValue:nil forKey:onePropertyName];
|
||||
}
|
||||
else {
|
||||
[self setValue:oneValue forKey:onePropertyName];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (NSDictionary *)rs_mergeValuesWithObjectReturningChanges:(id)object propertyNames:(NSArray *)propertyNames {
|
||||
|
||||
NSMutableDictionary *changes = [NSMutableDictionary new];
|
||||
|
||||
for (NSString *onePropertyName in propertyNames) {
|
||||
|
||||
id oneLocalValue = [self valueForKey:onePropertyName];
|
||||
id oneRemoteValue = [object valueForKey:onePropertyName];
|
||||
|
||||
if (RSEqualValues(oneLocalValue, oneRemoteValue)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
[self setValue:oneRemoteValue forKey:onePropertyName];
|
||||
changes[onePropertyName] = oneRemoteValue;
|
||||
}
|
||||
|
||||
return [changes copy];
|
||||
}
|
||||
|
||||
|
||||
- (NSDictionary *)rs_dictionaryOfNonNilValues:(NSArray *)propertyNames {
|
||||
|
||||
NSMutableDictionary *d = [NSMutableDictionary new];
|
||||
|
||||
for (NSString *onePropertyName in propertyNames) {
|
||||
|
||||
id oneValue = [self valueForKey:onePropertyName];
|
||||
if (RSIsNil(oneValue)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
d[onePropertyName] = oneValue;
|
||||
}
|
||||
|
||||
return [d copy];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -1,183 +0,0 @@
|
||||
//
|
||||
// NSOutlineView+Extensions.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 9/6/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
public extension NSOutlineView {
|
||||
|
||||
var selectedItems: [AnyObject] {
|
||||
if selectionIsEmpty {
|
||||
return [AnyObject]()
|
||||
}
|
||||
|
||||
return selectedRowIndexes.compactMap { (oneIndex) -> AnyObject? in
|
||||
return item(atRow: oneIndex) as AnyObject
|
||||
}
|
||||
}
|
||||
|
||||
var firstSelectedRow: Int? {
|
||||
|
||||
if selectionIsEmpty {
|
||||
return nil
|
||||
}
|
||||
return selectedRowIndexes.first
|
||||
}
|
||||
|
||||
var lastSelectedRow: Int? {
|
||||
|
||||
if selectionIsEmpty {
|
||||
return nil
|
||||
}
|
||||
return selectedRowIndexes.last
|
||||
}
|
||||
|
||||
@IBAction func selectPreviousRow(_ sender: Any?) {
|
||||
|
||||
guard var row = firstSelectedRow else {
|
||||
return
|
||||
}
|
||||
|
||||
if row < 1 {
|
||||
return
|
||||
}
|
||||
while true {
|
||||
row -= 1
|
||||
if row < 0 {
|
||||
return
|
||||
}
|
||||
if canSelect(row) {
|
||||
rs_selectRowAndScrollToVisible(row)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func selectNextRow(_ sender: Any?) {
|
||||
|
||||
// If no selectedRow, end up at first selectable row.
|
||||
var row = lastSelectedRow ?? -1
|
||||
|
||||
while true {
|
||||
row += 1
|
||||
if let _ = item(atRow: row) {
|
||||
if canSelect(row) {
|
||||
rs_selectRowAndScrollToVisible(row)
|
||||
return
|
||||
}
|
||||
}
|
||||
else {
|
||||
return // if there are no more items, we’re out of rows
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func collapseSelectedRows(_ sender: Any?) {
|
||||
|
||||
for item in selectedItems {
|
||||
if isExpandable(item) && isItemExpanded(item) {
|
||||
collapseItem(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func expandSelectedRows(_ sender: Any?) {
|
||||
|
||||
for item in selectedItems {
|
||||
if isExpandable(item) && !isItemExpanded(item) {
|
||||
expandItem(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func expandAll(_ sender: Any?) {
|
||||
|
||||
expandAllChildren(of: nil)
|
||||
}
|
||||
|
||||
@IBAction func collapseAllExceptForGroupItems(_ sender: Any?) {
|
||||
|
||||
collapseAllChildren(of: nil, exceptForGroupItems: true)
|
||||
}
|
||||
|
||||
func expandAllChildren(of item: Any?) {
|
||||
|
||||
guard let childItems = children(of: item) else {
|
||||
return
|
||||
}
|
||||
|
||||
for child in childItems {
|
||||
if !isItemExpanded(child) && isExpandable(child) {
|
||||
expandItem(child, expandChildren: true)
|
||||
}
|
||||
expandAllChildren(of: child)
|
||||
}
|
||||
}
|
||||
|
||||
func collapseAllChildren(of item: Any?, exceptForGroupItems: Bool) {
|
||||
|
||||
guard let childItems = children(of: item) else {
|
||||
return
|
||||
}
|
||||
|
||||
for child in childItems {
|
||||
collapseAllChildren(of: child, exceptForGroupItems: exceptForGroupItems)
|
||||
if exceptForGroupItems && isGroupItem(child) {
|
||||
continue
|
||||
}
|
||||
if isItemExpanded(child) {
|
||||
collapseItem(child, collapseChildren: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func children(of item: Any?) -> [Any]? {
|
||||
|
||||
var children = [Any]()
|
||||
for indexOfItem in 0..<numberOfChildren(ofItem: item) {
|
||||
if let child = child(indexOfItem, ofItem: item) {
|
||||
children.append(child)
|
||||
}
|
||||
}
|
||||
return children.isEmpty ? nil : children
|
||||
}
|
||||
|
||||
func isGroupItem(_ item: Any) -> Bool {
|
||||
|
||||
return delegate?.outlineView?(self, isGroupItem: item) ?? false
|
||||
}
|
||||
|
||||
func canSelect(_ row: Int) -> Bool {
|
||||
|
||||
guard let item = item(atRow: row) else {
|
||||
return false
|
||||
}
|
||||
return canSelectItem(item)
|
||||
}
|
||||
|
||||
func canSelectItem(_ item: Any) -> Bool {
|
||||
|
||||
let isSelectable = delegate?.outlineView?(self, shouldSelectItem: item) ?? true
|
||||
return isSelectable
|
||||
}
|
||||
|
||||
func selectItemAndScrollToVisible(_ item: Any) {
|
||||
|
||||
guard canSelectItem(item) else {
|
||||
return
|
||||
}
|
||||
|
||||
let rowToSelect = row(forItem: item)
|
||||
guard rowToSelect != -1 else {
|
||||
return
|
||||
}
|
||||
|
||||
rs_selectRowAndScrollToVisible(rowToSelect)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
//
|
||||
// NSPasteboard+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 11/14/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NSPasteboard (RSCore)
|
||||
|
||||
/*Pulls something that looks like a URL from the pasteboard. May return nil.
|
||||
The string won’t be normalized — for instance, it could return "apple.com".
|
||||
And the string may not really be a URL.*/
|
||||
|
||||
+ (nullable NSString *)rs_urlStringFromPasteboard:(NSPasteboard *)pasteboard;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,39 +0,0 @@
|
||||
//
|
||||
// NSPasteboard+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 11/14/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSPasteboard+RSCore.h"
|
||||
#import "NSString+RSCore.h"
|
||||
|
||||
|
||||
@implementation NSPasteboard (RSCore)
|
||||
|
||||
+ (nullable NSString *)rs_urlStringFromPasteboard:(NSPasteboard *)pasteboard {
|
||||
|
||||
return [pasteboard rs_urlString];
|
||||
}
|
||||
|
||||
- (nullable NSString *)rs_urlString {
|
||||
|
||||
NSString *type = [self availableTypeFromArray:@[NSStringPboardType]];
|
||||
if (!type) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSString *s = [self stringForType:type];
|
||||
if (RSStringIsEmpty(s)) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
if ([s rs_stringMayBeURL]) {
|
||||
return s;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
@ -1,30 +0,0 @@
|
||||
//
|
||||
// NSResponder-Extensions.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 10/10/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
public extension NSResponder {
|
||||
|
||||
public func hasAncestor(_ ancestor: NSResponder) -> Bool {
|
||||
|
||||
var nomad: NSResponder = self
|
||||
while(true) {
|
||||
if nomad === ancestor {
|
||||
return true
|
||||
}
|
||||
if let _ = nomad.nextResponder {
|
||||
nomad = nomad.nextResponder!
|
||||
}
|
||||
else {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
//
|
||||
// NSSet+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 8/15/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
#import <RSCore/RSBlocks.h>
|
||||
#import <RSCore/NSArray+RSCore.h>
|
||||
|
||||
|
||||
@interface NSSet (RSCore)
|
||||
|
||||
- (id)rs_anyObjectPassingTest:(RSTestBlock)testBlock;
|
||||
|
||||
- (NSSet *)rs_filter:(RSFilterBlock)filterBlock;
|
||||
|
||||
- (NSSet *)rs_objectsConformingToProtocol:(Protocol *)p;
|
||||
|
||||
|
||||
@end
|
@ -1,48 +0,0 @@
|
||||
//
|
||||
// NSSet+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 8/15/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSSet+RSCore.h"
|
||||
|
||||
@implementation NSSet (RSCore)
|
||||
|
||||
- (id)rs_anyObjectPassingTest:(RSTestBlock)testBlock {
|
||||
|
||||
for (id oneObject in self) {
|
||||
|
||||
if (testBlock(oneObject)) {
|
||||
return oneObject;
|
||||
}
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (NSSet *)rs_filter:(RSFilterBlock)filterBlock {
|
||||
|
||||
NSMutableSet *filteredSet = [NSMutableSet new];
|
||||
|
||||
for (id oneObject in self) {
|
||||
|
||||
if (filterBlock(oneObject)) {
|
||||
[filteredSet addObject:oneObject];
|
||||
}
|
||||
}
|
||||
|
||||
return [filteredSet copy];
|
||||
}
|
||||
|
||||
|
||||
- (NSSet *)rs_objectsConformingToProtocol:(Protocol *)p {
|
||||
|
||||
return [self rs_filter:^BOOL(id obj) {
|
||||
return [obj conformsToProtocol:p];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
@ -1,15 +0,0 @@
|
||||
//
|
||||
// NSStoryboard+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 11/20/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
|
||||
@interface NSStoryboard (RSCore)
|
||||
|
||||
+ (id)rs_initialControllerWithStoryboardName:(NSString *)storyboardName;
|
||||
|
||||
@end
|
@ -1,19 +0,0 @@
|
||||
//
|
||||
// NSStoryboard+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 11/20/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSStoryboard+RSCore.h"
|
||||
|
||||
@implementation NSStoryboard (RSCore)
|
||||
|
||||
+ (id)rs_initialControllerWithStoryboardName:(NSString *)storyboardName {
|
||||
|
||||
NSStoryboard *storyboard = [self storyboardWithName:storyboardName bundle:nil];
|
||||
return [storyboard instantiateInitialController];
|
||||
}
|
||||
|
||||
@end
|
@ -1,83 +0,0 @@
|
||||
//
|
||||
// NSString+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
@import CoreGraphics;
|
||||
|
||||
|
||||
BOOL RSStringIsEmpty(NSString * _Nullable s); /*Yes if null, NSNull, or length < 1*/
|
||||
|
||||
BOOL RSEqualStrings(NSString * _Nullable s1, NSString * _Nullable s2); /*Equal if both are nil*/
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSString *RSStringReplaceAll(NSString *stringToSearch, NSString *searchFor, NSString *replaceWith); /*Literal search*/
|
||||
|
||||
@interface NSString (RSCore)
|
||||
|
||||
|
||||
/*The hashed data is a UTF-8 encoded version of the string.*/
|
||||
|
||||
- (NSData *)rs_md5HashData;
|
||||
- (NSString *)rs_md5HashString;
|
||||
|
||||
|
||||
/*Trims whitespace from leading and trailing ends. Collapses internal whitespace to single @" " character.
|
||||
Whitespace is space, tag, cr, and lf characters.*/
|
||||
|
||||
- (NSString *)rs_stringWithCollapsedWhitespace;
|
||||
|
||||
- (NSString *)rs_stringByTrimmingWhitespace;
|
||||
|
||||
- (BOOL)rs_stringMayBeURL;
|
||||
|
||||
- (NSString *)rs_normalizedURLString; //Change feed: to http:, etc.
|
||||
|
||||
/*0.0f to 1.0f for each.*/
|
||||
|
||||
typedef struct {
|
||||
CGFloat red;
|
||||
CGFloat green;
|
||||
CGFloat blue;
|
||||
CGFloat alpha;
|
||||
} RSRGBAComponents;
|
||||
|
||||
/*red, green, blue components default to 1.0 if not specified.
|
||||
alpha defaults to 1.0 if not specified.*/
|
||||
|
||||
- (RSRGBAComponents)rs_rgbaComponents;
|
||||
|
||||
|
||||
/*If string doesn't have the prefix or suffix, it returns self. If prefix or suffix is nil or empty, returns self. If self and prefix or suffix are equal, returns @"".*/
|
||||
|
||||
- (NSString *)rs_stringByStrippingPrefix:(NSString *)prefix caseSensitive:(BOOL)caseSensitive;
|
||||
- (NSString *)rs_stringByStrippingSuffix:(NSString *)suffix caseSensitive:(BOOL)caseSensitive;
|
||||
|
||||
- (NSString *)rs_stringByStrippingHTML:(NSUInteger)maxCharacters;
|
||||
- (NSString *)rs_stringByConvertingToPlainText;
|
||||
|
||||
/*Filename from path, file URL string, or external URL string.*/
|
||||
|
||||
- (NSString *)rs_filename;
|
||||
|
||||
- (BOOL)rs_caseInsensitiveContains:(NSString *)s;
|
||||
|
||||
- (NSString *)rs_stringByEscapingSpecialXMLCharacters;
|
||||
|
||||
+ (NSString *)rs_stringWithNumberOfTabs:(NSInteger)numberOfTabs;
|
||||
- (NSString *)rs_stringByPrependingNumberOfTabs:(NSInteger)numberOfTabs;
|
||||
|
||||
// Remove leading http:// or https://
|
||||
|
||||
- (NSString *)rs_stringByStrippingHTTPOrHTTPSScheme;
|
||||
|
||||
+ (NSString *)rs_debugStringWithData:(NSData *)d; // Assume it’s UTF8, at least for now. Good enough for most debugging purposes.
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,446 +0,0 @@
|
||||
//
|
||||
// NSString+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSString+RSCore.h"
|
||||
#import "NSData+RSCore.h"
|
||||
|
||||
|
||||
BOOL RSStringIsEmpty(NSString *s) {
|
||||
|
||||
if (s == nil || (id)s == [NSNull null]) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
return s.length < 1;
|
||||
}
|
||||
|
||||
|
||||
BOOL RSEqualStrings(NSString *s1, NSString *s2) {
|
||||
|
||||
return (s1 == nil && s2 == nil) || [s1 isEqualToString:s2];
|
||||
}
|
||||
|
||||
|
||||
NSString *RSStringReplaceAll(NSString *stringToSearch, NSString *searchFor, NSString *replaceWith) {
|
||||
|
||||
if (RSStringIsEmpty(stringToSearch)) {
|
||||
return stringToSearch;
|
||||
}
|
||||
if (searchFor == nil || replaceWith == nil) {
|
||||
return stringToSearch;
|
||||
}
|
||||
|
||||
NSMutableString *s = [stringToSearch mutableCopy];
|
||||
[s replaceOccurrencesOfString:searchFor withString:replaceWith options:NSLiteralSearch range:NSMakeRange(0, [s length])];
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@implementation NSString (RSCore)
|
||||
|
||||
|
||||
- (NSData *)rs_md5HashData {
|
||||
|
||||
NSData *data = [self dataUsingEncoding:NSUTF8StringEncoding];
|
||||
return [data rs_md5Hash];
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_md5HashString {
|
||||
|
||||
NSData *d = [self rs_md5HashData];
|
||||
return [d rs_hexadecimalString];
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_stringWithCollapsedWhitespace {
|
||||
|
||||
NSMutableString *dest = [self mutableCopy];
|
||||
|
||||
CFStringTrimWhitespace((__bridge CFMutableStringRef)dest);
|
||||
|
||||
[dest replaceOccurrencesOfString:@"\t" withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [dest length])];
|
||||
[dest replaceOccurrencesOfString:@"\r" withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [dest length])];
|
||||
[dest replaceOccurrencesOfString:@"\n" withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [dest length])];
|
||||
|
||||
while ([dest rangeOfString:@" " options:NSLiteralSearch].location != NSNotFound) {
|
||||
[dest replaceOccurrencesOfString:@" " withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [dest length])];
|
||||
}
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_stringByTrimmingWhitespace {
|
||||
|
||||
return [self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_stringContainsAnyCharacterFromSet:(NSCharacterSet *)characterSet {
|
||||
|
||||
NSRange range = [self rangeOfCharacterFromSet:characterSet];
|
||||
return range.length > 0;
|
||||
}
|
||||
|
||||
- (BOOL)rs_stringMayBeURL {
|
||||
|
||||
NSString *s = [self rs_stringByTrimmingWhitespace];
|
||||
if (RSStringIsEmpty(s)) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (![s containsString:@"."]) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
if ([s rs_stringContainsAnyCharacterFromSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]) {
|
||||
return NO;
|
||||
}
|
||||
if ([s rs_stringContainsAnyCharacterFromSet:[NSCharacterSet controlCharacterSet]]) {
|
||||
return NO;
|
||||
}
|
||||
if ([s rs_stringContainsAnyCharacterFromSet:[NSCharacterSet illegalCharacterSet]]) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_stringByReplacingPrefix:(NSString *)prefix withHTTPPrefix:(NSString *)httpPrefix {
|
||||
|
||||
if ([self.lowercaseString hasPrefix:prefix]) {
|
||||
|
||||
NSString *s = [self rs_stringByStrippingPrefix:prefix caseSensitive:NO];
|
||||
if (![s hasPrefix:@"//"]) {
|
||||
s = [NSString stringWithFormat:@"//%@", s];
|
||||
}
|
||||
s = [NSString stringWithFormat:@"%@%@", httpPrefix, s];
|
||||
|
||||
return s;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
/*
|
||||
given a URL that could be prefixed with 'feed:' or 'feeds:',
|
||||
convert it to a URL that begins with 'http:' or 'https:'
|
||||
|
||||
Note: must handle edge case (like boingboing.net) where the feed URL is feed:http://boingboing.net/feed
|
||||
|
||||
Strategy:
|
||||
1) note whether or not this is a feed: or feeds: or other prefix
|
||||
2) strip the feed: or feeds: prefix
|
||||
3) if the resulting string is not prefixed with http: or https:, then add http:// as a prefix
|
||||
|
||||
*/
|
||||
- (NSString *)rs_normalizedURLString {
|
||||
|
||||
NSString *s = [self rs_stringByTrimmingWhitespace];
|
||||
|
||||
static NSString *feedPrefix = @"feed:";
|
||||
static NSString *feedsPrefix = @"feeds:";
|
||||
static NSString *httpPrefix = @"http";
|
||||
static NSString *httpsPrefix = @"https";
|
||||
Boolean wasFeeds = false;
|
||||
|
||||
NSString *lowercaseS = [s lowercaseString];
|
||||
if ([lowercaseS hasPrefix:feedPrefix] || [lowercaseS hasPrefix:feedsPrefix]) {
|
||||
if ([lowercaseS hasPrefix:feedsPrefix]) {
|
||||
wasFeeds = true;
|
||||
s = [s rs_stringByStrippingPrefix:feedsPrefix caseSensitive:NO];
|
||||
} else {
|
||||
s = [s rs_stringByStrippingPrefix:feedPrefix caseSensitive:NO];
|
||||
}
|
||||
}
|
||||
|
||||
lowercaseS = [s lowercaseString];
|
||||
if (![lowercaseS hasPrefix:httpPrefix]) {
|
||||
s = [NSString stringWithFormat: @"%@://%@", wasFeeds ? httpsPrefix : httpPrefix, s];
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
- (RSRGBAComponents)rs_rgbaComponents {
|
||||
|
||||
RSRGBAComponents components = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||
|
||||
NSMutableString *s = [self mutableCopy];
|
||||
[s replaceOccurrencesOfString:@"#" withString:@"" options:NSLiteralSearch range:NSMakeRange(0, [s length])];
|
||||
CFStringTrimWhitespace((__bridge CFMutableStringRef)s);
|
||||
|
||||
unsigned int red = 0, green = 0, blue = 0, alpha = 0;
|
||||
|
||||
if ([s length] >= 2) {
|
||||
if ([[NSScanner scannerWithString:[s substringWithRange:NSMakeRange(0, 2)]] scanHexInt:&red]) {
|
||||
components.red = (CGFloat)red / 255.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if ([s length] >= 4) {
|
||||
if ([[NSScanner scannerWithString:[s substringWithRange:NSMakeRange(2, 2)]] scanHexInt:&green]) {
|
||||
components.green = (CGFloat)green / 255.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if ([s length] >= 6) {
|
||||
if ([[NSScanner scannerWithString:[s substringWithRange:NSMakeRange(4, 2)]] scanHexInt:&blue]) {
|
||||
components.blue = (CGFloat)blue / 255.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if ([s length] >= 8) {
|
||||
if ([[NSScanner scannerWithString:[s substringWithRange:NSMakeRange(6, 2)]] scanHexInt:&alpha]) {
|
||||
components.alpha = (CGFloat)alpha / 255.0f;
|
||||
}
|
||||
}
|
||||
|
||||
return components;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_stringByStrippingPrefix:(NSString *)prefix caseSensitive:(BOOL)caseSensitive {
|
||||
|
||||
if (RSStringIsEmpty(prefix)) {
|
||||
return self;
|
||||
}
|
||||
|
||||
if (!caseSensitive) {
|
||||
if (![self.lowercaseString hasPrefix:prefix.lowercaseString])
|
||||
return self;
|
||||
}
|
||||
else if (![self hasPrefix:prefix]) {
|
||||
return self;
|
||||
}
|
||||
|
||||
if ([self isEqualToString:prefix]) {
|
||||
return @"";
|
||||
}
|
||||
if (!caseSensitive && [self caseInsensitiveCompare:prefix] == NSOrderedSame) {
|
||||
return @"";
|
||||
}
|
||||
|
||||
return [self substringFromIndex:[prefix length]];
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_stringByStrippingSuffix:(NSString *)suffix caseSensitive:(BOOL)caseSensitive {
|
||||
|
||||
if (RSStringIsEmpty(suffix)) {
|
||||
return self;
|
||||
}
|
||||
if (!caseSensitive) {
|
||||
if (![self.lowercaseString hasSuffix:suffix.lowercaseString]) {
|
||||
return self;
|
||||
}
|
||||
}
|
||||
else if (![self hasSuffix:suffix]) {
|
||||
return self;
|
||||
}
|
||||
|
||||
if ([self isEqualToString:suffix]) {
|
||||
return @"";
|
||||
}
|
||||
if (!caseSensitive && [self caseInsensitiveCompare:suffix] == NSOrderedSame) {
|
||||
return @"";
|
||||
}
|
||||
|
||||
return [self substringToIndex:self.length - suffix.length];
|
||||
}
|
||||
|
||||
- (NSString *)rs_stringByStrippingHTML:(NSUInteger)maxCharacters {
|
||||
|
||||
if (![self containsString:@"<"]) {
|
||||
|
||||
if (maxCharacters > 0 && [self length] > maxCharacters) {
|
||||
return [self substringToIndex:maxCharacters];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
NSMutableString *preflightedCopy = [self mutableCopy];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"<blockquote>" withString:@" " options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"</blockquote>" withString:@" " options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"<p>" withString:@" " options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"</p>" withString:@" " options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"<div>" withString:@" " options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"</div>" withString:@" " options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
|
||||
CFMutableStringRef s = CFStringCreateMutable(kCFAllocatorDefault, (CFIndex)preflightedCopy.length);
|
||||
NSUInteger i = 0;
|
||||
NSUInteger level = 0;
|
||||
BOOL lastCharacterWasSpace = NO;
|
||||
unichar ch;
|
||||
const unichar chspace = ' ';
|
||||
NSUInteger charactersAdded = 0;
|
||||
|
||||
for (i = 0; i < preflightedCopy.length; i++) {
|
||||
|
||||
ch = [preflightedCopy characterAtIndex:i];
|
||||
|
||||
if (ch == '<') {
|
||||
level++;
|
||||
}
|
||||
else if (ch == '>') {
|
||||
level--;
|
||||
}
|
||||
else if (level == 0) {
|
||||
|
||||
if (ch == ' ' || ch == '\r' || ch == '\t' || ch == '\n') {
|
||||
if (lastCharacterWasSpace) {
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
lastCharacterWasSpace = YES;
|
||||
}
|
||||
ch = chspace;
|
||||
}
|
||||
else {
|
||||
lastCharacterWasSpace = NO;
|
||||
}
|
||||
|
||||
CFStringAppendCharacters(s, &ch, 1);
|
||||
if (maxCharacters > 0) {
|
||||
charactersAdded++;
|
||||
if (charactersAdded >= maxCharacters) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (__bridge_transfer NSString *)s;
|
||||
}
|
||||
|
||||
- (NSString *)rs_stringByConvertingToPlainText {
|
||||
|
||||
if (![self containsString:@"<"]) {
|
||||
return self;
|
||||
}
|
||||
|
||||
NSMutableString *preflightedCopy = [self mutableCopy];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"<blockquote>" withString:@"\n\n" options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"</blockquote>" withString:@"\n\n" options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"<p>" withString:@"\n" options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"</p>" withString:@"\n\n" options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"<div>" withString:@"\n" options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"</div>" withString:@"\n" options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"<br>" withString:@"\n" options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"<br />" withString:@"\n" options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"<br/>" withString:@"\n" options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
[preflightedCopy replaceOccurrencesOfString:@"</li>" withString:@"\n" options:NSCaseInsensitiveSearch range:NSMakeRange(0, preflightedCopy.length)];
|
||||
|
||||
CFMutableStringRef s = CFStringCreateMutable(kCFAllocatorDefault, (CFIndex)preflightedCopy.length);
|
||||
NSUInteger level = 0;
|
||||
|
||||
for (NSUInteger i = 0; i < preflightedCopy.length; i++) {
|
||||
|
||||
unichar ch = [preflightedCopy characterAtIndex:i];
|
||||
|
||||
if (ch == '<') {
|
||||
level++;
|
||||
}
|
||||
else if (ch == '>') {
|
||||
level--;
|
||||
}
|
||||
else if (level == 0) {
|
||||
CFStringAppendCharacters(s, &ch, 1);
|
||||
}
|
||||
}
|
||||
|
||||
NSMutableString *plainTextString = [(__bridge_transfer NSString *)s mutableCopy];
|
||||
while ([plainTextString rangeOfString:@"\n\n\n"].location != NSNotFound) {
|
||||
[plainTextString replaceOccurrencesOfString:@"\n\n\n" withString:@"\n\n" options:NSLiteralSearch range:NSMakeRange(0, plainTextString.length)];
|
||||
}
|
||||
|
||||
return plainTextString;
|
||||
}
|
||||
|
||||
- (NSString *)rs_filename {
|
||||
|
||||
NSArray *components = [self componentsSeparatedByString:@"/"];
|
||||
NSString *filename = components.lastObject;
|
||||
if (RSStringIsEmpty(filename)) {
|
||||
if (components.count > 1) {
|
||||
filename = components[components.count - 2];
|
||||
}
|
||||
}
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_caseInsensitiveContains:(NSString *)s {
|
||||
|
||||
NSRange range = [self rangeOfString:s options:NSCaseInsensitiveSearch];
|
||||
return range.location != NSNotFound;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_stringByEscapingSpecialXMLCharacters {
|
||||
|
||||
NSMutableString *s = [self mutableCopy];
|
||||
|
||||
[s replaceOccurrencesOfString:@"\"" withString:@""" options:NSLiteralSearch range:NSMakeRange(0, self.length)];
|
||||
[s replaceOccurrencesOfString:@"<" withString:@"<" options:NSLiteralSearch range:NSMakeRange(0, s.length)];
|
||||
[s replaceOccurrencesOfString:@">" withString:@">" options:NSLiteralSearch range:NSMakeRange(0, s.length)];
|
||||
[s replaceOccurrencesOfString:@"&" withString:@"&" options:NSLiteralSearch range:NSMakeRange(0, s.length)];
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
+ (NSString *)rs_stringWithNumberOfTabs:(NSInteger)numberOfTabs {
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
static NSMutableDictionary *cache = nil;
|
||||
|
||||
dispatch_once(&onceToken, ^{
|
||||
cache = [NSMutableDictionary new];
|
||||
});
|
||||
|
||||
NSString *cachedString = cache[@(numberOfTabs)];
|
||||
if (cachedString) {
|
||||
return cachedString;
|
||||
}
|
||||
|
||||
NSMutableString *s = [@"" mutableCopy];
|
||||
for (NSInteger i = 0; i < numberOfTabs; i++) {
|
||||
[s appendString:@"\t"];
|
||||
}
|
||||
|
||||
cache[@(numberOfTabs)] = s;
|
||||
return s;
|
||||
}
|
||||
|
||||
- (NSString *)rs_stringByPrependingNumberOfTabs:(NSInteger)numberOfTabs {
|
||||
|
||||
NSString *tabs = [NSString rs_stringWithNumberOfTabs:numberOfTabs];
|
||||
return [tabs stringByAppendingString:self];
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)rs_stringByStrippingHTTPOrHTTPSScheme {
|
||||
|
||||
NSString *s = [self rs_stringByStrippingPrefix:@"http://" caseSensitive:NO];
|
||||
s = [s rs_stringByStrippingPrefix:@"https://" caseSensitive:NO];
|
||||
return s;
|
||||
}
|
||||
|
||||
+ (NSString *)rs_debugStringWithData:(NSData *)d {
|
||||
|
||||
return [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -1,87 +0,0 @@
|
||||
//
|
||||
// NSTableView+Extensions.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 9/6/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
public extension NSTableView {
|
||||
|
||||
var selectionIsEmpty: Bool {
|
||||
return selectedRowIndexes.startIndex == selectedRowIndexes.endIndex
|
||||
}
|
||||
|
||||
func indexesOfAvailableRowsPassingTest(_ test: (Int) -> Bool) -> IndexSet? {
|
||||
|
||||
// Checks visible and in-flight rows.
|
||||
|
||||
var indexes = IndexSet()
|
||||
enumerateAvailableRowViews { (_, row) in
|
||||
if test(row) {
|
||||
indexes.insert(row)
|
||||
}
|
||||
}
|
||||
|
||||
return indexes.isEmpty ? nil : indexes
|
||||
}
|
||||
|
||||
func indexesOfAvailableRows() -> IndexSet? {
|
||||
|
||||
var indexes = IndexSet()
|
||||
enumerateAvailableRowViews { indexes.insert($1) }
|
||||
return indexes.isEmpty ? nil : indexes
|
||||
}
|
||||
|
||||
func scrollTo(row: Int) {
|
||||
|
||||
guard let scrollView = self.enclosingScrollView else {
|
||||
return
|
||||
}
|
||||
let documentVisibleRect = scrollView.documentVisibleRect
|
||||
|
||||
let r = rect(ofRow: row)
|
||||
if NSContainsRect(documentVisibleRect, r) {
|
||||
return
|
||||
}
|
||||
|
||||
let rMidY = NSMidY(r)
|
||||
var scrollPoint = NSZeroPoint;
|
||||
let extraHeight = 150
|
||||
scrollPoint.y = floor(rMidY - (documentVisibleRect.size.height / 2.0)) + CGFloat(extraHeight)
|
||||
scrollPoint.y = max(scrollPoint.y, 0)
|
||||
|
||||
let maxScrollPointY = frame.size.height - documentVisibleRect.size.height
|
||||
scrollPoint.y = min(maxScrollPointY, scrollPoint.y)
|
||||
|
||||
let clipView = scrollView.contentView
|
||||
|
||||
let rClipView = NSMakeRect(scrollPoint.x, scrollPoint.y, NSWidth(clipView.bounds), NSHeight(clipView.bounds))
|
||||
|
||||
clipView.animator().bounds = rClipView
|
||||
}
|
||||
|
||||
func visibleRowViews() -> [NSTableRowView]? {
|
||||
|
||||
guard let scrollView = self.enclosingScrollView, numberOfRows > 0 else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let range = rows(in: scrollView.documentVisibleRect)
|
||||
let ixMax = numberOfRows - 1
|
||||
let ixStart = min(range.location, ixMax)
|
||||
let ixEnd = min(((range.location + range.length) - 1), ixMax)
|
||||
|
||||
var visibleRows = [NSTableRowView]()
|
||||
|
||||
for ixRow in ixStart...ixEnd {
|
||||
if let oneRowView = rowView(atRow: ixRow, makeIfNecessary: false) {
|
||||
visibleRows += [oneRowView]
|
||||
}
|
||||
}
|
||||
|
||||
return visibleRows.isEmpty ? nil : visibleRows
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
//
|
||||
// NSTableView+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/29/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
|
||||
|
||||
@interface NSTableView (RSCore)
|
||||
|
||||
|
||||
- (void)rs_selectRow:(NSInteger)row;
|
||||
- (void)rs_selectRowAndScrollToVisible:(NSInteger)row;
|
||||
|
||||
|
||||
@end
|
@ -1,26 +0,0 @@
|
||||
//
|
||||
// NSTableView+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/29/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSTableView+RSCore.h"
|
||||
|
||||
@implementation NSTableView (RSCore)
|
||||
|
||||
|
||||
- (void)rs_selectRow:(NSInteger)row {
|
||||
|
||||
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:(NSUInteger)row] byExtendingSelection:NO];
|
||||
}
|
||||
|
||||
|
||||
- (void)rs_selectRowAndScrollToVisible:(NSInteger)row {
|
||||
|
||||
[self rs_selectRow:row];
|
||||
[self scrollRowToVisible:row];
|
||||
}
|
||||
|
||||
@end
|
@ -1,18 +0,0 @@
|
||||
//
|
||||
// NSTimer+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
|
||||
@interface NSTimer (RSCore)
|
||||
|
||||
|
||||
- (void)rs_invalidateIfValid;
|
||||
|
||||
|
||||
@end
|
@ -1,23 +0,0 @@
|
||||
//
|
||||
// NSTimer+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSTimer+RSCore.h"
|
||||
|
||||
|
||||
@implementation NSTimer (RSCore)
|
||||
|
||||
|
||||
- (void)rs_invalidateIfValid {
|
||||
|
||||
if ([self isValid]) {
|
||||
[self invalidate];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,32 +0,0 @@
|
||||
//
|
||||
// NSView+RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
|
||||
|
||||
@interface NSView (RSCore)
|
||||
|
||||
|
||||
/*Keeps subview at same size as receiver.*/
|
||||
|
||||
- (void)rs_addFullSizeConstraintsForSubview:(NSView *)view;
|
||||
|
||||
- (void)rs_setFrameIfNotEqual:(NSRect)r;
|
||||
|
||||
@property (nonatomic, readonly) BOOL rs_isOrIsDescendedFromFirstResponder;
|
||||
@property (nonatomic, readonly) BOOL rs_shouldDrawAsActive;
|
||||
|
||||
- (NSRect)rs_rectCenteredVertically:(NSRect)originalRect;
|
||||
|
||||
- (NSRect)rs_rectCenteredHorizontally:(NSRect)originalRect;
|
||||
|
||||
- (NSRect)rs_rectCentered:(NSRect)originalRect;
|
||||
|
||||
- (NSTableView *)rs_enclosingTableView;
|
||||
|
||||
@end
|
@ -1,82 +0,0 @@
|
||||
//
|
||||
// NSView+RSCore.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSView+RSCore.h"
|
||||
#import "RSGeometry.h"
|
||||
|
||||
|
||||
@implementation NSView (RSCore)
|
||||
|
||||
|
||||
- (void)rs_addFullSizeConstraintsForSubview:(NSView *)view {
|
||||
|
||||
NSDictionary *d = NSDictionaryOfVariableBindings(view);
|
||||
|
||||
NSArray *constraints = [NSLayoutConstraint constraintsWithVisualFormat:@"|-0-[view]-0-|" options:0 metrics:nil views:d];
|
||||
[self addConstraints:constraints];
|
||||
constraints = [NSLayoutConstraint constraintsWithVisualFormat:@"V:|-0-[view]-0-|" options:0 metrics:nil views:d];
|
||||
[self addConstraints:constraints];
|
||||
}
|
||||
|
||||
|
||||
- (void)rs_setFrameIfNotEqual:(NSRect)r {
|
||||
|
||||
if (!NSEqualRects(self.frame, r)) {
|
||||
self.frame = r;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_isOrIsDescendedFromFirstResponder {
|
||||
|
||||
NSView *firstResponder = (NSView *)(self.window.firstResponder);
|
||||
if (![firstResponder isKindOfClass:[NSView class]]) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
return [self isDescendantOf:firstResponder];
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)rs_shouldDrawAsActive {
|
||||
|
||||
return self.window.isMainWindow && self.rs_isOrIsDescendedFromFirstResponder;
|
||||
}
|
||||
|
||||
|
||||
- (NSRect)rs_rectCenteredVertically:(NSRect)originalRect {
|
||||
|
||||
return RSRectCenteredVerticallyInRect(originalRect, self.bounds);
|
||||
}
|
||||
|
||||
- (NSRect)rs_rectCenteredHorizontally:(NSRect)originalRect {
|
||||
|
||||
return RSRectCenteredHorizontallyInRect(originalRect, self.bounds);
|
||||
}
|
||||
|
||||
- (NSRect)rs_rectCentered:(NSRect)originalRect {
|
||||
|
||||
return RSRectCenteredInRect(originalRect, self.bounds);
|
||||
}
|
||||
|
||||
|
||||
- (NSTableView *)rs_enclosingTableView {
|
||||
|
||||
NSView *nomad = self.superview;
|
||||
|
||||
while (nomad != nil) {
|
||||
if ([nomad isKindOfClass:[NSTableView class]]) {
|
||||
return (NSTableView *)nomad;
|
||||
}
|
||||
nomad = nomad.superview;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
@ -1,94 +0,0 @@
|
||||
//
|
||||
// NSWindow-Extensions.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 10/10/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
public extension NSWindow {
|
||||
|
||||
public var isDisplayingSheet: Bool {
|
||||
|
||||
return attachedSheet != nil
|
||||
}
|
||||
|
||||
public func makeFirstResponderUnlessDescendantIsFirstResponder(_ responder: NSResponder) {
|
||||
|
||||
if let fr = firstResponder, fr.hasAncestor(responder) {
|
||||
return
|
||||
}
|
||||
makeFirstResponder(responder)
|
||||
}
|
||||
|
||||
public func setPointAndSizeAdjustingForScreen(point: NSPoint, size: NSSize, minimumSize: NSSize) {
|
||||
|
||||
// point.y specifices from the *top* of the screen, even though screen coordinates work from the bottom up. This is for convenience.
|
||||
// The eventual size may be smaller than requested, since the screen may be small, but not smaller than minimumSize.
|
||||
|
||||
guard let screenFrame = screen?.visibleFrame else {
|
||||
return
|
||||
}
|
||||
|
||||
let paddingFromScreenEdge: CGFloat = 8.0
|
||||
let x = point.x
|
||||
let y = screenFrame.maxY - point.y
|
||||
|
||||
var width = size.width
|
||||
var height = size.height
|
||||
|
||||
if x + width > screenFrame.maxX {
|
||||
width = max((screenFrame.maxX - x) - paddingFromScreenEdge, minimumSize.width)
|
||||
}
|
||||
if y - height < 0.0 {
|
||||
height = max((screenFrame.maxY - point.y) - paddingFromScreenEdge, minimumSize.height)
|
||||
}
|
||||
|
||||
let frame = NSRect(x: x, y: y, width: width, height: height)
|
||||
setFrame(frame, display: true)
|
||||
setFrameTopLeftPoint(frame.origin)
|
||||
}
|
||||
|
||||
public var flippedOrigin: NSPoint? {
|
||||
|
||||
// Screen coordinates start at lower-left.
|
||||
// With this we can use upper-left, like sane people.
|
||||
|
||||
get {
|
||||
guard let screenFrame = screen?.frame else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let flippedPoint = NSPoint(x: frame.origin.x, y: screenFrame.maxY - frame.maxY)
|
||||
return flippedPoint
|
||||
}
|
||||
set {
|
||||
guard let screenFrame = screen?.frame else {
|
||||
return
|
||||
}
|
||||
var point = newValue!
|
||||
point.y = screenFrame.maxY - point.y
|
||||
setFrameTopLeftPoint(point)
|
||||
}
|
||||
}
|
||||
|
||||
public func setFlippedOriginAdjustingForScreen(_ point: NSPoint) {
|
||||
|
||||
guard let screenFrame = screen?.frame else {
|
||||
return
|
||||
}
|
||||
|
||||
let paddingFromEdge: CGFloat = 8.0
|
||||
var unflippedPoint = point
|
||||
unflippedPoint.y = (screenFrame.maxY - point.y) - frame.height
|
||||
if unflippedPoint.y < 0 {
|
||||
unflippedPoint.y = paddingFromEdge
|
||||
}
|
||||
if unflippedPoint.x < 0 {
|
||||
unflippedPoint.x = paddingFromEdge
|
||||
}
|
||||
setFrameOrigin(unflippedPoint)
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
//
|
||||
// OPMLRepresentable.swift
|
||||
// DataModel
|
||||
//
|
||||
// Created by Brent Simmons on 7/1/17.
|
||||
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public protocol OPMLRepresentable {
|
||||
|
||||
func OPMLString(indentLevel: Int) -> String
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
//
|
||||
// PasteboardWriterOwner.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 2/11/18.
|
||||
// Copyright © 2018 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
public protocol PasteboardWriterOwner {
|
||||
|
||||
var pasteboardWriter: NSPasteboardWriting { get }
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
//
|
||||
// PlistProviderProtocol.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 7/31/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// For objects that can be serialized as an array or dictionary.
|
||||
// Mainly used for objects that can be stored on disk.
|
||||
// Unlike NSCoder it provides human-readable archives.
|
||||
// Does not do any checking on the contents, but they must be plist objects.
|
||||
|
||||
public protocol PlistProvider: class {
|
||||
|
||||
func plist() -> AnyObject?
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
//
|
||||
// PropertyList.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 7/12/17.
|
||||
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// These functions eat errors.
|
||||
|
||||
public func propertyList(withData data: Data) -> Any? {
|
||||
|
||||
do {
|
||||
return try PropertyListSerialization.propertyList(from: data, options: [], format: nil)
|
||||
} catch {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// Create a binary plist.
|
||||
|
||||
public func data(withPropertyList plist: Any) -> Data? {
|
||||
|
||||
do {
|
||||
return try PropertyListSerialization.data(fromPropertyList: plist, format: .binary, options: 0)
|
||||
}
|
||||
catch {
|
||||
return nil
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
//
|
||||
// RSBackgroundColorView.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
|
||||
|
||||
IB_DESIGNABLE
|
||||
@interface RSBackgroundColorView : NSView
|
||||
|
||||
|
||||
@property (nonatomic) IBInspectable NSColor *backgroundColor;
|
||||
|
||||
|
||||
@end
|
@ -1,67 +0,0 @@
|
||||
//
|
||||
// RSBackgroundColorView.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RSBackgroundColorView.h"
|
||||
|
||||
|
||||
@implementation RSBackgroundColorView
|
||||
|
||||
- (BOOL)isOpaque {
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
//- (BOOL)preservesContentDuringLiveResize {
|
||||
//
|
||||
// return YES;
|
||||
//}
|
||||
//
|
||||
//
|
||||
//- (BOOL)wantsDefaultClipping {
|
||||
//
|
||||
// return NO;
|
||||
//}
|
||||
//
|
||||
//
|
||||
//- (void)setFrameSize:(NSSize)newSize {
|
||||
//
|
||||
// if (NSEqualSizes(newSize, self.frame.size)) {
|
||||
// return;
|
||||
// }
|
||||
// [super setFrameSize:newSize];
|
||||
//
|
||||
// if (self.inLiveResize) {
|
||||
// NSRect rects[4];
|
||||
// NSInteger count = 0;
|
||||
// [self getRectsExposedDuringLiveResize:rects count:&count];
|
||||
// while (count-- > 0) {
|
||||
// [self setNeedsDisplayInRect:rects[count]];
|
||||
// }
|
||||
// } else {
|
||||
// self.needsDisplay = YES;
|
||||
// }
|
||||
//}
|
||||
|
||||
- (void)drawRect:(NSRect)r {
|
||||
|
||||
// const NSRect *rects;
|
||||
// NSInteger count = 0;
|
||||
//
|
||||
// [self getRectsBeingDrawn:&rects count:&count];
|
||||
// if (count < 1) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
[self.backgroundColor setFill];
|
||||
NSRectFill(r);
|
||||
// NSRectFillList(rects, count);
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,46 +0,0 @@
|
||||
//
|
||||
// RSBlocks.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
#import <RSCore/RSPlatform.h>
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
@import UIKit;
|
||||
#endif
|
||||
|
||||
typedef void (^RSVoidBlock)(void);
|
||||
|
||||
typedef RSVoidBlock RSVoidCompletionBlock;
|
||||
|
||||
typedef BOOL (^RSBoolBlock)(void);
|
||||
|
||||
typedef void (^RSFetchResultsBlock)(NSArray *fetchedObjects);
|
||||
|
||||
typedef void (^RSDataResultBlock)(NSData *d);
|
||||
|
||||
typedef void (^RSObjectResultBlock)(id obj);
|
||||
|
||||
typedef void (^RSSetResultBlock)(NSSet *set);
|
||||
|
||||
typedef void (^RSBoolResultBlock)(BOOL flag);
|
||||
|
||||
typedef BOOL (^RSTestBlock)(id obj);
|
||||
|
||||
/*Images*/
|
||||
|
||||
typedef void (^RSImageResultBlock)(RS_IMAGE *image);
|
||||
|
||||
typedef RS_IMAGE *(^RSImageRenderBlock)(RS_IMAGE *imageToRender);
|
||||
|
||||
|
||||
/*Calls on main thread. Ignores if nil.*/
|
||||
|
||||
void RSCallCompletionBlock(RSVoidCompletionBlock completion);
|
||||
|
||||
void RSCallBlockWithParameter(RSObjectResultBlock block, id obj);
|
||||
|
@ -1,36 +0,0 @@
|
||||
//
|
||||
// RSBlocks.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RSBlocks.h"
|
||||
|
||||
void RSCallCompletionBlock(RSVoidCompletionBlock completion) {
|
||||
|
||||
if (!completion) {
|
||||
return;
|
||||
}
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
@autoreleasepool {
|
||||
completion();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void RSCallBlockWithParameter(RSObjectResultBlock block, id obj) {
|
||||
|
||||
if (!block) {
|
||||
return;
|
||||
}
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
@autoreleasepool {
|
||||
block(obj);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1,25 +0,0 @@
|
||||
//
|
||||
// RSConstants.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, RSPosition) {
|
||||
RSPositionFirst,
|
||||
RSPositionMiddle,
|
||||
RSPositionLast,
|
||||
RSPositionOnly
|
||||
};
|
||||
|
||||
|
||||
extern NSString *RSUniqueIDKey; //@"uniqueID"
|
||||
extern NSString *RSImageKey; //@"image"
|
||||
extern NSString *RSChildrenKey; //@"children"
|
||||
extern NSString *RSNameKey; //@"name"
|
||||
extern NSString *RSTypeKey; //@"type"
|
||||
extern NSString *RSFolderKey; //@"folder"
|
||||
extern NSString *RSURLKey; //@"url"
|
@ -1,17 +0,0 @@
|
||||
//
|
||||
// RSConstants.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RSConstants.h"
|
||||
|
||||
NSString *RSUniqueIDKey = @"uniqueID";
|
||||
NSString *RSImageKey = @"image";
|
||||
NSString *RSChildrenKey = @"children";
|
||||
NSString *RSNameKey = @"name";
|
||||
NSString *RSTypeKey = @"type";
|
||||
NSString *RSFolderKey = @"folder";
|
||||
NSString *RSURLKey = @"url";
|
@ -1,71 +0,0 @@
|
||||
//
|
||||
// RSCore.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
#import <RSCore/RSBlocks.h>
|
||||
#import <RSCore/RSConstants.h>
|
||||
#import <RSCore/RSPlatform.h>
|
||||
|
||||
|
||||
/*Foundation*/
|
||||
|
||||
#import <RSCore/NSArray+RSCore.h>
|
||||
#import <RSCore/NSCalendar+RSCore.h>
|
||||
#import <RSCore/NSData+RSCore.h>
|
||||
#import <RSCore/NSDate+RSCore.h>
|
||||
#import <RSCore/NSDictionary+RSCore.h>
|
||||
#import <RSCore/NSFileManager+RSCore.h>
|
||||
#import <RSCore/NSMutableArray+RSCore.h>
|
||||
#import <RSCore/NSMutableDictionary+RSCore.h>
|
||||
#import <RSCore/NSMutableSet+RSCore.h>
|
||||
#import <RSCore/NSNotificationCenter+RSCore.h>
|
||||
#import <RSCore/NSObject+RSCore.h>
|
||||
#import <RSCore/NSSet+RSCore.h>
|
||||
#import <RSCore/NSTimer+RSCore.h>
|
||||
#import <RSCore/NSString+RSCore.h>
|
||||
|
||||
#import <RSCore/RSPlist.h>
|
||||
|
||||
|
||||
#if !TARGET_OS_IPHONE
|
||||
|
||||
/*AppKit*/
|
||||
|
||||
#import <RSCore/NSColor+RSCore.h>
|
||||
#import <RSCore/NSEvent+RSCore.h>
|
||||
#import <RSCore/NSPasteboard+RSCore.h>
|
||||
#import <RSCore/NSStoryboard+RSCore.h>
|
||||
#import <RSCore/NSTableView+RSCore.h>
|
||||
#import <RSCore/NSView+RSCore.h>
|
||||
|
||||
#import <RSCore/RSBackgroundColorView.h>
|
||||
#import <RSCore/RSOpaqueContainerView.h>
|
||||
#import <RSCore/RSTransparentContainerView.h>
|
||||
|
||||
#import <RSCore/NSImage+RSCore.h>
|
||||
|
||||
#import <RSCore/RSGeometry.h>
|
||||
|
||||
#import <RSCore/NSAppleEventDescriptor+RSCore.h>
|
||||
#import <RSCore/SendToBlogEditorApp.h>
|
||||
|
||||
#import <RSCore/NSAttributedString+RSCore.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*Images*/
|
||||
|
||||
#import <RSCore/RSImageRenderer.h>
|
||||
#import <RSCore/RSScaling.h>
|
||||
|
||||
|
||||
/*Text*/
|
||||
|
||||
#import <RSCore/RSMacroProcessor.h>
|
||||
|
@ -1,15 +0,0 @@
|
||||
//
|
||||
// RSGeometry.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/13/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
NSRect RSRectCenteredVerticallyInRect(NSRect originalRect, NSRect containerRect);
|
||||
|
||||
NSRect RSRectCenteredHorizontallyInRect(NSRect originalRect, NSRect containerRect);
|
||||
|
||||
NSRect RSRectCenteredInRect(NSRect originalRect, NSRect containerRect);
|
@ -1,36 +0,0 @@
|
||||
//
|
||||
// RSGeometry.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/13/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RSGeometry.h"
|
||||
|
||||
|
||||
NSRect RSRectCenteredVerticallyInRect(NSRect originalRect, NSRect containerRect) {
|
||||
|
||||
NSRect r = originalRect;
|
||||
r.origin.y = NSMidY(containerRect) - (NSHeight(r) / 2.0);
|
||||
r = NSIntegralRect(r);
|
||||
r.size = originalRect.size;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
NSRect RSRectCenteredHorizontallyInRect(NSRect originalRect, NSRect containerRect) {
|
||||
|
||||
NSRect r = originalRect;
|
||||
r.origin.x = NSMidX(containerRect) - (NSWidth(r) / 2.0);
|
||||
r = NSIntegralRect(r);
|
||||
r.size = originalRect.size;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
NSRect RSRectCenteredInRect(NSRect originalRect, NSRect containerRect) {
|
||||
|
||||
NSRect r = RSRectCenteredVerticallyInRect(originalRect, containerRect);
|
||||
return RSRectCenteredHorizontallyInRect(r, containerRect);
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
//
|
||||
// RSImageRenderer.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
#import "RSBlocks.h"
|
||||
|
||||
|
||||
/*Used to render an image based on another image. (Thumbnails, for instance.)
|
||||
Thread-safe. Renders in a background queue.
|
||||
|
||||
imageRenderBlock is responsible for dealing with graphics context; it returns the rendered image.
|
||||
|
||||
imageResultBlock may be called on any thread.
|
||||
|
||||
None of the parameters may be nil.
|
||||
*/
|
||||
|
||||
|
||||
@interface RSImageRenderer : NSObject
|
||||
|
||||
|
||||
- (instancetype)initWithRenderer:(RSImageRenderBlock)imageRenderBlock;
|
||||
|
||||
- (void)renderImage:(RS_IMAGE *)originalImage imageResultBlock:(RSImageResultBlock)imageResultBlock;
|
||||
|
||||
|
||||
@end
|
@ -1,69 +0,0 @@
|
||||
//
|
||||
// RSImageRenderer.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RSImageRenderer.h"
|
||||
|
||||
static void RSImageRender(RS_IMAGE *originalImage, RSImageRenderBlock renderer, RSImageResultBlock imageCallback) {
|
||||
|
||||
assert(originalImage != nil);
|
||||
assert(renderer != nil);
|
||||
assert(imageCallback != nil);
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
|
||||
|
||||
@autoreleasepool {
|
||||
|
||||
RS_IMAGE *renderedImage = renderer(originalImage);
|
||||
imageCallback(renderedImage);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@interface RSImageRenderer ()
|
||||
|
||||
@property (nonatomic, copy) RSImageRenderBlock imageRenderBlock;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@implementation RSImageRenderer
|
||||
|
||||
|
||||
#pragma mark - Init
|
||||
|
||||
- (instancetype)initWithRenderer:(RSImageRenderBlock)imageRenderBlock {
|
||||
|
||||
NSParameterAssert(imageRenderBlock != nil);
|
||||
|
||||
self = [super init];
|
||||
if (self == nil) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
_imageRenderBlock = imageRenderBlock;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - API
|
||||
|
||||
- (void)renderImage:(RS_IMAGE *)originalImage imageResultBlock:(RSImageResultBlock)imageResultBlock {
|
||||
|
||||
NSParameterAssert(originalImage != nil);
|
||||
NSParameterAssert(imageResultBlock != nil);
|
||||
|
||||
RSImageRender(originalImage, self.imageRenderBlock, imageResultBlock);
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@ -1,19 +0,0 @@
|
||||
//
|
||||
// RSMacroProcessor.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 10/26/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RSMacroProcessor : NSObject
|
||||
|
||||
+ (NSString *)renderedTextWithTemplate:(NSString *)templateString substitutions:(NSDictionary *)substitutions macroStart:(NSString *)macroStart macroEnd:(NSString *)macroEnd;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,120 +0,0 @@
|
||||
//
|
||||
// RSMacroProcessor.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 10/26/15.
|
||||
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RSMacroProcessor.h"
|
||||
|
||||
|
||||
@interface RSMacroProcessor ()
|
||||
|
||||
@property (nonatomic, readonly) NSString *template;
|
||||
@property (nonatomic, readonly) NSDictionary *substitutions;
|
||||
@property (nonatomic, readonly) NSString *macroStart;
|
||||
@property (nonatomic, readonly) NSString *macroEnd;
|
||||
@property (nonatomic, readonly) NSUInteger numberOfMacroStartCharacters;
|
||||
@property (nonatomic, readonly) NSUInteger numberOfMacroEndCharacters;
|
||||
@property (nonatomic) NSString *renderedText;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation RSMacroProcessor
|
||||
|
||||
#pragma mark - Class Methods
|
||||
|
||||
+ (NSString *)renderedTextWithTemplate:(NSString *)templateString substitutions:(NSDictionary *)substitutions macroStart:(NSString *)macroStart macroEnd:(NSString *)macroEnd {
|
||||
|
||||
RSMacroProcessor *macroProcessor = [[self alloc] initWithTemplate:templateString substitutions:substitutions macroStart:macroStart macroEnd:macroEnd];
|
||||
return macroProcessor.renderedText;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Init
|
||||
|
||||
- (instancetype)initWithTemplate:(NSString *)templateString substitutions:(NSDictionary *)substitutions macroStart:(NSString *)macroStart macroEnd:(NSString *)macroEnd {
|
||||
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
_template = templateString;
|
||||
_substitutions = substitutions;
|
||||
_macroStart = macroStart;
|
||||
_macroEnd = macroEnd;
|
||||
_numberOfMacroStartCharacters = _macroStart.length;
|
||||
_numberOfMacroEndCharacters = _macroEnd.length;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Accessors
|
||||
|
||||
- (NSString *)renderedText {
|
||||
|
||||
if (!_renderedText) {
|
||||
_renderedText = [self processMacros];
|
||||
}
|
||||
|
||||
return _renderedText;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (NSUInteger)indexOfString:(NSString *)s beforeIndex:(NSUInteger)ix inString:(NSString *)stringToSearch {
|
||||
|
||||
if (ix < s.length) {
|
||||
return NSNotFound;
|
||||
}
|
||||
|
||||
NSRange range = [stringToSearch rangeOfString:s options:NSBackwardsSearch range:NSMakeRange(0, ix)];
|
||||
if (range.length < s.length) {
|
||||
return NSNotFound;
|
||||
}
|
||||
|
||||
return range.location;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)processMacros {
|
||||
|
||||
NSMutableString *s = [self.template mutableCopy];
|
||||
|
||||
NSUInteger lastIndexOfMacroStart = s.length;
|
||||
|
||||
while (true) {
|
||||
|
||||
NSUInteger ixMacroEnd = [self indexOfString:self.macroEnd beforeIndex:lastIndexOfMacroStart inString:s];
|
||||
if (ixMacroEnd == NSNotFound) {
|
||||
break;
|
||||
}
|
||||
|
||||
NSUInteger ixMacroStart = [self indexOfString:self.macroStart beforeIndex:ixMacroEnd inString:s];
|
||||
if (ixMacroStart == NSNotFound) {
|
||||
break;
|
||||
}
|
||||
|
||||
NSRange range = NSMakeRange(ixMacroStart, (ixMacroEnd - ixMacroStart) + self.numberOfMacroEndCharacters);
|
||||
|
||||
NSRange keyRange = range;
|
||||
keyRange.location += self.numberOfMacroStartCharacters;
|
||||
keyRange.length -= (self.numberOfMacroStartCharacters + self.numberOfMacroEndCharacters);
|
||||
NSString *key = [s substringWithRange:keyRange];
|
||||
|
||||
NSString *substition = [self.substitutions objectForKey:key];
|
||||
if (substition) {
|
||||
[s replaceCharactersInRange:range withString:substition];
|
||||
}
|
||||
|
||||
lastIndexOfMacroStart = ixMacroStart;
|
||||
}
|
||||
|
||||
return [s copy];
|
||||
}
|
||||
|
||||
@end
|
@ -1,21 +0,0 @@
|
||||
//
|
||||
// RSOpaqueContainerView.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/27/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import AppKit;
|
||||
#import <RSCore/RSBackgroundColorView.h>
|
||||
|
||||
|
||||
/*This view has one subview, which it resizes to fit the bounds of this view.*/
|
||||
|
||||
@interface RSOpaqueContainerView : RSBackgroundColorView
|
||||
|
||||
|
||||
@property (nonatomic) NSView *containedView; /*Removes old.*/
|
||||
|
||||
|
||||
@end
|
@ -1,52 +0,0 @@
|
||||
//
|
||||
// RSOpaqueContainerView.m
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/27/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RSOpaqueContainerView.h"
|
||||
#import "NSView+RSCore.h"
|
||||
|
||||
|
||||
@implementation RSOpaqueContainerView
|
||||
|
||||
|
||||
+ (BOOL)requiresConstraintBasedLayout {
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
- (NSView *)containedView {
|
||||
|
||||
return self.subviews.firstObject;
|
||||
}
|
||||
|
||||
|
||||
- (void)setContainedView:(NSView *)containedView {
|
||||
|
||||
[self.subviews makeObjectsPerformSelector:@selector(removeFromSuperviewWithoutNeedingDisplay)];
|
||||
[self addSubview:containedView];
|
||||
self.needsLayout = YES;
|
||||
self.needsDisplay = YES;
|
||||
}
|
||||
|
||||
|
||||
- (void)layout {
|
||||
|
||||
[self resizeSubviewsWithOldSize:NSZeroSize];
|
||||
}
|
||||
|
||||
|
||||
- (void)resizeSubviewsWithOldSize:(NSSize)oldSize {
|
||||
|
||||
#pragma unused(oldSize)
|
||||
|
||||
NSView *subview = self.subviews.firstObject;
|
||||
[subview rs_setFrameIfNotEqual:self.bounds];
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -1,48 +0,0 @@
|
||||
//
|
||||
// RSPlatform.h
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 3/25/15.
|
||||
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
/*Mac: ~/Application Support/AppName/
|
||||
|
||||
If nil, gets appName from Info.plist -- @"CFBundleExecutable" key.
|
||||
It creates the folder and intermediate folders if necessary.
|
||||
|
||||
If something goes wrong it returns nil. The error is NSLogged.
|
||||
Panic, at that point, is strongly indicated.*/
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSString * _Nullable RSDataFolder(NSString * _Nullable appName);
|
||||
|
||||
/*Path to file in folder specified by RSDataFolder.
|
||||
appName may be nil -- it's passed to RSDataFolder.*/
|
||||
|
||||
NSString * _Nullable RSDataFile(NSString * _Nullable appName, NSString *fileName);
|
||||
|
||||
/* app support/appName/folderName/ */
|
||||
|
||||
NSString * _Nullable RSDataSubfolder(NSString * _Nullable appName, NSString *folderName);
|
||||
|
||||
/* app support/appName/folderName/filename */
|
||||
|
||||
NSString * _Nullable RSDataSubfolderFile(NSString * _Nullable appName, NSString *folderName, NSString *filename);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
#define RS_IMAGE UIImage
|
||||
|
||||
#else
|
||||
|
||||
#define RS_IMAGE NSImage
|
||||
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user