次のように定義されたサブクラスがあります。
#import <Cocoa/Cocoa.h>
@interface ICMusicBrowserWindowController : NSWindowController
{
}
次に、上記のサブクラスのインスタンスを次のように作成します
ICMusicBrowserWindowController *musicBrowserWindowController = [[ICMusicBrowserWindowController alloc] initWithWindowNibName:@"Browser"];
[musicBrowserWindowController setDelegate:self];
window
そんな風にお願いしてみるmusicBrowserWindowController
。
[NSApp beginSheet:[musicBrowserWindowController window]
modalForWindow:[[self view] window]
modalDelegate:self
didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
contextInfo:nil];
ただし、そうすると、警告メッセージが表示されますwindow maybe deprecated because receiver type is unknown
。
私が間違っていることに関する提案はありますか?この警告メッセージは OSX Lion でのみ表示されることに気付きました。ありがとう。