| Home 目次>ApplicationKit>NSDocument | |
readableTypes
ドキュメントオブジェクトが読むことのできるファイルタイプを返します
+(NSArray *) readableTypes
【返り値】 | |
| NSArray * | ファイルタイプの配列 |
【解説】
ドキュメントオブジェクトが読むことのできるファイルタイプを返します。
Info.plistの「書類のタイプ」で「役割」がEditorかViewerの項目の「名前」の配列です。
【例文】
#import "MyObject.h"
#import "MyDocument.h"
@implementation MyObject
- ( IBAction )myAction:( id )sender
{
//doc は NSDocument
[doc runModalSavePanelForSaveOperation:NSSaveOperation
delegate: self
didSaveSelector: @selector (saveAction:)
contextInfo: nil
];
}
- ( void )saveAction:( id )sender
{
NSLog([[MyDocument readableTypes] description]);
}
@end
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSDocument | 修正日2006.12.26 |