以下の内容はhttps://nakamura001.hatenablog.com/entry/20080929/1222698401より取得しました。


ほぼ日、MacのGUI - Alert(アラート)

NSAlertのサンプルです。

	res = [[NSAlert 
		alertWithMessageText:@"書類“名称未設定”に加えた変更を保存しますか?" 
		defaultButton:@"保存" 
		alternateButton:@"保存しない" 
		otherButton:@"キャンセル" 
		informativeTextWithFormat:@"保存しないと、変更内容は失われます。"] runModal];
引数 説明
alertWithMessageText アラートのタイトル。 nil で省略可能。省略したときは「Alert」となります
defaultButton デフォルトボタン。 nil で省略可能。省略したときは「OK」となります
alternateButton 拡張ボタン。 nil で省略可能。省略したときは「拡張ボタン」が表示されません
otherButton その他のボタン。 nil で省略可能。省略したときは「その他ボタン」が表示されません
informativeTextWithFormat 本文

公式のヘルプはこちら。

NSAlert Class Reference
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAlert_Class/Reference/Reference.html

日本語の解説が良い人はこちらのSatoshi Oomoriさんのページを参照下さい。

http://www.oomori.com/cocoafw/ApplicationKit/NSButton/index.html
※注記
http://www.oomori.com/cocodesu/index.html

ソースコードこちら




以上の内容はhttps://nakamura001.hatenablog.com/entry/20080929/1222698401より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14