Re: NSScrollView setDocumentView: problem with NSView subclass
Re: NSScrollView setDocumentView: problem with NSView subclass
- Subject: Re: NSScrollView setDocumentView: problem with NSView subclass
- From: glenn andreas <email@hidden>
- Date: Wed, 20 Jul 2005 20:45:51 -0500
On Jul 20, 2005, at 7:18 PM, Matt Ball wrote:
I've got an NSScrollView (added with IB) in my app. I've got an NSView
subclass that I am trying to add as the scrollView's documentView, but
I keep getting the following warning:
"Passing argument 1 of 'setDocumentView:' from incompatible pointer
type."
Because setDocumentView: takes an NSView (or subclass).
From the header, we see that theImageView is an imageView (BTW -
class names should not start with a lower case letter - one should
use "ImageView").
@class imageView;
@interface imageViewController : NSObject
{
IBOutlet id scrollView;
imageView *theImageView;
}
and that it's a class. That's all that the compiler knows - it
doesn't know if theImageView is a subclass of NSView, NSObject,
NSProxy, or something completely different. That's what it's warning
you about.
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden