savePanel
セーブパネルを返します
解説
セーブパネル(NSSavePanel)を返します。
なければ作って返します
初期設定の属性
・現在のフォルダの場所
・プロンプトは"Name"
・ファイルタイプの指定なし
・ファイルパッケージは開かない
・デリゲート無し
・アクセサリビュー無し
返り値
( NSSavePanel * )
セーブパネル
引数
フレームワーク
ApplicationKit
クラス
NSSavePanel
Class Methods
使用可能
10.0
参照
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { NSSavePanel *spanel = [NSSavePanel savePanel]; [spanel setRequiredFileType:@"rtfd"]; [spanel beginSheetForDirectory:NSHomeDirectory() file:nil modalForWindow:myWindow modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:conextInfo:) contextInfo:NULL]; } -(void)didEndSaveSheet:(NSSavePanel *)savePanel returnCode:(int)returnCode conextInfo:(void *)contextInfo { if (returnCode == NSOKButton){ NSLog([[savePanel URL] absoluteString]); }else{ NSLog(@"Cansel"); } } @end