• 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
Need help with warning: passing argument 1 of ... from distinct Objective C type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help with warning: passing argument 1 of ... from distinct Objective C type


  • Subject: Need help with warning: passing argument 1 of ... from distinct Objective C type
  • From: Jason Horn <email@hidden>
  • Date: Tue, 6 Nov 2007 13:07:40 -0500

I am getting a compiler warning that makes no sense to me:

warning: passing argument 1 of 'setImage:' from distinct Objective C type

My code is generating a CIImage and then passing it to a view object (VideoView) for drawing. As far as I can tell, the compiler is trying to tell me that the object (CIImage) that I am sending to the setImage method is of the wrong type. But it looks right to me. Does anyone know what is going wrong here?

CIImage *resultImg;
CIFilter *sbcAdjust;
CIImage *ciImage = [CIImage alloc];
[ciImage initWithBitmapImageRep:bitmap];
sbcAdjust = [CIFilter filterWithName:@"CIColorControls"];
[sbcAdjust setDefaults];
[sbcAdjust setValue:ciImage forKey:@"inputImage"];
[sbcAdjust setValue:[NSNumber numberWithFloat:brightness] forKey:@"inputBrightness"];
[sbcAdjust setValue:[NSNumber numberWithFloat:contrast] forKey:@"inputContrast"];
resultImg = [sbcAdjust valueForKey: @"outputImage"];
[videoView setImage:resultImg];


In the VideoView class, setImage is defined as follows:

- (void)setImage:(CIImage *)frameImage
{
	[frameImage retain];
	[image release];
	image = frameImage;
	[self setNeedsDisplay:YES];
}

_______________________________________________

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


  • Follow-Ups:
    • Re: Need help with warning: passing argument 1 of ... from distinct Objective C type
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Extend QuickLook to other standard files
  • Next by Date: Re: Receiving mouseDown event in NSTextView subclass outside of the text container
  • Previous by thread: Re: Receiving mouseDown event in NSTextView subclass outside of the text container
  • Next by thread: Re: Need help with warning: passing argument 1 of ... from distinct Objective C type
  • Index(es):
    • Date
    • Thread