In a mac desktop app, I'm getting an "Unrecognized selector sent to instance" error.
Here's the line that causes the error:
My_WebView *mvw = [mWebView LoadHtml];
And here's the relevant class definition:
My_WebView.h
#import <WebKit/WebKit.h>
@interface My_WebView : WebView
{
}
- (My_WebView *) LoadHtml; // initialize the WebView with a page
@end
My_WebView.mm
#import "My_WebView.h"
@implementation My_WebView
- (My_WebView *) LoadHtml
{
NSLog(@"Loading HTML...");
// do stuff...
return self;
}
@end
When I run my code in the XCode debugger and break at the offending line, I'm told that mWebView
is of the expected type (My_WebView
). This rules out the problems identified in the many similar questions I've seen here.
Does anyone know what I'm doing wrong?