getting accessor method info in a different class.
getting accessor method info in a different class.
- Subject: getting accessor method info in a different class.
- From: jon <email@hidden>
- Date: Fri, 18 Sep 2009 14:42:31 -0600
In one class, I have set webView up like this... which works fine,
but i want to have access to this pointer from another class...
i am not getting something correct here, it gives me warning:
"WebView may not respond to webView"
i'll just include the relevant code.
what am i not understanding about accessor methods?
what is the proper way to have access to the pointer of the webView
but in a different class..
the webviewcontroller class works as it should, (the .m file has the
@synthesize in it) but the bookmarkcontroller class returns the
warning above. (some extra stuff is added like @class to see if it
would help)
Jon.
header of class webviewcontroller:
-------------------------------------------------------------------------
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
@interface webViewController : NSDocument
{
IBOutlet WebView *webView;
}
@property(readwrite,retain) WebView *webView;
@end
-------------------------------------------------------------------------
header of class BookMarkController:
-------------------------------------------------------------------------
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
#import "webViewController.h"
@class WebView;
@interface BookMarkController : NSWindowController
{
WebView *theWebView;
}
@end
-------------------------------------------------------------------------
implementation of class BookMarkController:
-------------------------------------------------------------------------
#import "BookMarkController.h"
@implementation BookMarkController
- (void)setup
{
[theWebView webView]; // here i get the warning;
}
@end
-------------------------------------------------------------------------
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden