I have a subclass defined as follows,
#import <Cocoa/Cocoa.h>
@interface ICMusicBrowserWindowController : NSWindowController
{
}
I then create an instance of the above subclass as follows
ICMusicBrowserWindowController *musicBrowserWindowController = [[ICMusicBrowserWindowController alloc] initWithWindowNibName:@"Browser"];
[musicBrowserWindowController setDelegate:self];
I try to ask for window from musicBrowserWindowController like so.
[NSApp beginSheet:[musicBrowserWindowController window]
modalForWindow:[[self view] window]
modalDelegate:self
didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
contextInfo:nil];
However when doing so, I get the warning message, window maybe deprecated because receiver type is unknown.
Any suggestions as to what I am doing wrong? I noticed this warning message only appeared in OSX Lion. Thanks.
update: i just put the header of my subClass of NSWindowController into the class where i was using the [instance window]
and the warning went away… (i had also put in forward declaration @Class of my subclass of NSWindowController into the header of where i was using it) one or both of these fixed the warning… so try that.
so my previous answer was off i now believe.