• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
getting accessor method info in a different class.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: What is the life of the c string returned by NSString's UTF8String method?
  • Next by Date: Re: What is the life of the c string returned by NSString's UTF8String method?
  • Previous by thread: Re: What is the life of the c string returned by NSString's UTF8String method?
  • Next by thread: Re: access to object from a different class
  • Index(es):
    • Date
    • Thread