• 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
Re: NSScrollView setDocumentView: problem with NSView subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSScrollView setDocumentView: problem with NSView subclass
      • From: Matt Ball <email@hidden>
References: 
 >NSScrollView setDocumentView: problem with NSView subclass (From: Matt Ball <email@hidden>)

  • Prev by Date: NSArrayController "contentArray" binding not necessary ?
  • Next by Date: Using fetched properties to feed a tree controller.
  • Previous by thread: Re: NSScrollView setDocumentView: problem with NSView subclass
  • Next by thread: Re: NSScrollView setDocumentView: problem with NSView subclass
  • Index(es):
    • Date
    • Thread