SWFファイル内の画像を表示/書き出しするGUIツール
Revision | 366d19feae91469c3aae2305ed54a5bce176858a (tree) |
---|---|
Zeit | 2016-10-02 09:33:25 |
Autor | masakih <masakih@user...> |
Commiter | masakih |
HMSwfImage: pathではなくURLを基本とした
@@ -72,7 +72,7 @@ class HMSwfDocument: NSDocument { | ||
72 | 72 | } |
73 | 73 | let swfImage = HMSwfImage() |
74 | 74 | swfImage.image = image |
75 | - swfImage.filepath = $0.path | |
75 | + swfImage.url = $0 | |
76 | 76 | |
77 | 77 | return swfImage |
78 | 78 | }.sorted { |
@@ -10,10 +10,10 @@ | ||
10 | 10 | |
11 | 11 | @interface HMSwfImage : NSObject |
12 | 12 | |
13 | -@property (strong) NSString *filepath; | |
13 | +@property (strong) NSURL *URL; | |
14 | 14 | @property (strong) NSImage *image; |
15 | 15 | |
16 | 16 | @property (readonly) NSString *name; |
17 | 17 | @property (readonly) NSString *typeName; |
18 | -@property (readonly) NSURL *URL; | |
18 | + | |
19 | 19 | @end |
@@ -12,15 +12,11 @@ | ||
12 | 12 | |
13 | 13 | - (NSString *)name |
14 | 14 | { |
15 | - NSString *filename = self.filepath.lastPathComponent.stringByDeletingPathExtension; | |
15 | + NSString *filename = self.URL.lastPathComponent.stringByDeletingPathExtension; | |
16 | 16 | |
17 | 17 | NSArray<NSString *> *comp = [filename componentsSeparatedByString:@"-"]; |
18 | 18 | if(comp.count > 1) return comp[1]; |
19 | 19 | |
20 | 20 | return filename; |
21 | 21 | } |
22 | -- (NSURL *)URL | |
23 | -{ | |
24 | - return [NSURL fileURLWithPath:self.filepath]; | |
25 | -} | |
26 | 22 | @end |