Re: NSImage method problem
Re: NSImage method problem
- Subject: Re: NSImage method problem
- From: Greg Titus <email@hidden>
- Date: Fri, 16 May 2003 08:03:44 -0700
On Friday, May 16, 2003, at 07:24 AM, Jericho Hasselbush wrote:
In the method:
- (void)drawInRect:(NSRect)dstRect fromRect:(NSRect)srcRect
operation:(NSCompositingOperation)op fraction:(float)delta
when I use 1.0 or a float value for the fraction: argument, I get a
compile error:
SimpleGameView.m:29: incompatible type for argument 4 of indirect
function call
Which makes absolutely no sense, because I am calling the function as
follows:
[image drawInRect:box fromRect:NULL operation:NSCompositeSourceOver
fraction:1.0];
Hi Jericho,
Your problem is actually with the srcRect argument. You are passing it
a pointer (NULL) instead of an NSRect. The reason why the compiler is
telling you argument 4 is that there are two hidden and implicit
arguments at the beginning of every Objective-C method: the receiver,
and the selector. So from the compiler's point of view, the srcRect
argument is the 4th one.
Hope this helps,
- Greg
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.