• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

SWFファイル内の画像を表示/書き出しするGUIツール


Commit MetaInfo

Revision366d19feae91469c3aae2305ed54a5bce176858a (tree)
Zeit2016-10-02 09:33:25
Autormasakih <masakih@user...>
Commitermasakih

Log Message

HMSwfImage: pathではなくURLを基本とした

Ändern Zusammenfassung

Diff

--- a/KoreNoKaraSu/HMSwfDocument.swift
+++ b/KoreNoKaraSu/HMSwfDocument.swift
@@ -72,7 +72,7 @@ class HMSwfDocument: NSDocument {
7272 }
7373 let swfImage = HMSwfImage()
7474 swfImage.image = image
75- swfImage.filepath = $0.path
75+ swfImage.url = $0
7676
7777 return swfImage
7878 }.sorted {
--- a/KoreNoKaraSu/HMSwfImage.h
+++ b/KoreNoKaraSu/HMSwfImage.h
@@ -10,10 +10,10 @@
1010
1111 @interface HMSwfImage : NSObject
1212
13-@property (strong) NSString *filepath;
13+@property (strong) NSURL *URL;
1414 @property (strong) NSImage *image;
1515
1616 @property (readonly) NSString *name;
1717 @property (readonly) NSString *typeName;
18-@property (readonly) NSURL *URL;
18+
1919 @end
--- a/KoreNoKaraSu/HMSwfImage.m
+++ b/KoreNoKaraSu/HMSwfImage.m
@@ -12,15 +12,11 @@
1212
1313 - (NSString *)name
1414 {
15- NSString *filename = self.filepath.lastPathComponent.stringByDeletingPathExtension;
15+ NSString *filename = self.URL.lastPathComponent.stringByDeletingPathExtension;
1616
1717 NSArray<NSString *> *comp = [filename componentsSeparatedByString:@"-"];
1818 if(comp.count > 1) return comp[1];
1919
2020 return filename;
2121 }
22-- (NSURL *)URL
23-{
24- return [NSURL fileURLWithPath:self.filepath];
25-}
2622 @end