iSightを使ってBooklog,MediaMarkerインポート用CSVファイルを生成するアプリ
Revision | 524ad219d40a6472a73f56b717b328fd68982858 (tree) |
---|---|
Time | 2011-03-02 23:25:14 |
Author | masakih <masakih@user...> |
Commiter | masakih |
[Mod] 10.5用に改変。
@@ -139,11 +139,16 @@ | ||
139 | 139 | [panel setAllowedFileTypes:[NSArray arrayWithObject:@"csv"]]; |
140 | 140 | [panel setPrompt:NSLocalizedString(@"Export", @"Export")]; |
141 | 141 | [panel setTitle:NSLocalizedString(@"Export", @"Export")]; |
142 | - [panel setNameFieldStringValue:@"Import.csv"]; | |
143 | 142 | [panel setCanCreateDirectories:YES]; |
144 | 143 | [panel setCanSelectHiddenExtension:YES]; |
145 | 144 | |
146 | - NSInteger res = [panel runModal]; | |
145 | + NSInteger res = 0; | |
146 | + if([panel respondsToSelector:@selector(setNameFieldStringValue:)]) { | |
147 | + [panel setNameFieldStringValue:@"Import.csv"]; // 10.6 only. | |
148 | + res = [panel runModal]; | |
149 | + } else { | |
150 | + res = [panel runModalForDirectory:nil file:@"Import.csv"]; | |
151 | + } | |
147 | 152 | if(res == NSCancelButton) return; |
148 | 153 | |
149 | 154 | BEBooksExporter *exporter = [BEBooksExporter exporterWithType:accessoryController.type]; |