Skip to content

Commit

Permalink
fixed outdated API
Browse files Browse the repository at this point in the history
switched to invalidateCachedImmutableModelObjects from invalidateLightweightCopy:
  • Loading branch information
JohnCoates committed Feb 22, 2016
1 parent 1623f34 commit 212dae0
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 13 deletions.
7 changes: 4 additions & 3 deletions CSSketch Helper/CSSketch Helper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
FA4B27A61C63FE3800C82A0C /* SketchKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SketchKit.xcodeproj; path = ../External/SketchKit/SketchKit.xcodeproj; sourceTree = "<group>"; };
FA4B27BC1C64182500C82A0C /* CSS Launcher */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "CSS Launcher"; sourceTree = BUILT_PRODUCTS_DIR; };
FA4B27BE1C64182500C82A0C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
FA4B27DF1C6542DF00C82A0C /* CSSketchInstaller.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CSSketchInstaller.app; sourceTree = BUILT_PRODUCTS_DIR; };
FA4B27DF1C6542DF00C82A0C /* CSSketch Install.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "CSSketch Install.app"; sourceTree = BUILT_PRODUCTS_DIR; };
FA4B27E11C6542DF00C82A0C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
FA4B27E21C6542DF00C82A0C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
FA4B27E51C6542DF00C82A0C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -350,7 +350,7 @@
FA56F7CF1BC0D6C4005673E0 /* CSSketch Helper.bundle */,
FA7D76D51BC1AB6900FCDEF5 /* CSK Tests.xctest */,
FA4B27BC1C64182500C82A0C /* CSS Launcher */,
FA4B27DF1C6542DF00C82A0C /* CSSketchInstaller.app */,
FA4B27DF1C6542DF00C82A0C /* CSSketch Install.app */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -522,7 +522,7 @@
);
name = "CSSketch Install";
productName = "CSSketch-Installer";
productReference = FA4B27DF1C6542DF00C82A0C /* CSSketchInstaller.app */;
productReference = FA4B27DF1C6542DF00C82A0C /* CSSketch Install.app */;
productType = "com.apple.product-type.application";
};
FA56F7CE1BC0D6C4005673E0 /* CSSketch Helper */ = {
Expand Down Expand Up @@ -975,6 +975,7 @@
FA4B27EF1C6542DF00C82A0C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
FA56F7CA1BC0D6C4005673E0 /* Build configuration list for PBXProject "CSSketch Helper" */ = {
isa = XCConfigurationList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
Expand Down
4 changes: 2 additions & 2 deletions CSSketch Helper/CSSketch Helper/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.1</string>
<string>1.11</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1</string>
<string>1.11</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 John Coates. All rights reserved.</string>
<key>NSPrincipalClass</key>
Expand Down
5 changes: 5 additions & 0 deletions CSSketch Helper/src/Headers/CSKSketchHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@
@property (readonly) CSK_MSStyle *style;


// OLD Version of invalidateCachedImmutableModelObjects
// version < 3.5
- (void)invalidateLightweightCopy:(id)arg1;
// version >= 3.5
- (void)invalidateCachedImmutableModelObjects;

// groups only
// version < 3.5
- (BOOL)resizeRoot:(BOOL)resize;
Expand Down
7 changes: 6 additions & 1 deletion CSSketch Helper/src/Headers/CSKSketchHeaders.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@ - (BOOL)resizeRoot:(BOOL)resize {
return true;
}

- (void)hideSelectionTemporarily {

}

// OLD Version of invalidateCachedImmutableModelObjects
- (void)invalidateLightweightCopy:(id)arg1 {

}

- (void)hideSelectionTemporarily {
- (void)invalidateCachedImmutableModelObjects {

}
@end
Expand Down
10 changes: 9 additions & 1 deletion CSSketch Helper/src/Models/Layout/CSKLayerCSS.m
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,15 @@ + (void)handleTextColorWithDOMLeaf:(NSDictionary *)DOMLeaf layer:(CSK_MSLayer *)
[textLayer syncTextStyleAttributes];
[textLayer layerDidChange];

[textLayer invalidateLightweightCopy:nil];
if ([textLayer respondsToSelector:@selector(invalidateCachedImmutableModelObjects)]) {
[textLayer invalidateCachedImmutableModelObjects];
}
else if ([textLayer respondsToSelector:@selector(invalidateLightweightCopy:)]) {
[textLayer invalidateLightweightCopy:nil];
}
else {
NSLog(@"Couldn't vfind way to invalidate cached immutable model objects for: %@", textLayer);
}

}

Expand Down
10 changes: 5 additions & 5 deletions CSSketch.sketchplugin/CSSketch Helper.bundle/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.11</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<string>1.11</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>7C68</string>
<string>7C1002</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>15C43</string>
<key>DTSDKName</key>
<string>macosx10.11</string>
<key>DTXcode</key>
<string>0720</string>
<string>0721</string>
<key>DTXcodeBuild</key>
<string>7C68</string>
<string>7C1002</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 John Coates. All rights reserved.</string>
</dict>
Expand Down
Binary file not shown.

0 comments on commit 212dae0

Please sign in to comment.