• 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: NSImage method problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage method problem


  • Subject: Re: NSImage method problem
  • From: David Remahl <email@hidden>
  • Date: Fri, 16 May 2003 17:10:52 +0200

Jericho,

Actually, the compiler is tricking you.

When the ObjC compiler compiles your code, it transforms your method call into a C function, that looks like this:

objc_msgSend( id target, SEL selector, arg1type argument1, arg2type argument2, etc );.

That is what the compiler means by "argument 4 of _indirect_ function call". Argument four is actually the second parameter in your method call (ie, srcRect).

You are trying to pass a NULL pointer in place of a structure. You will have to use the constant NSZeroRect instead (although I'm still not convinced that drawInRect::: is documented to automatically expand NSZeroRect to mean the full image dimensions...)

/ Regards, David

On Friday, May 16, 2003, at 04:24 PM, 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];

thanks for the help

------------------------------------------------------------
Jericho Hasselbush || <email@hidden>

"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-Albert Einstein
_______________________________________________
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.
_______________________________________________
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.

  • Follow-Ups:
    • NSImage cell tanking
      • From: John Timmer <email@hidden>
References: 
 >NSImage method problem (From: Jericho Hasselbush <email@hidden>)

  • Prev by Date: Re: NSImage method problem
  • Next by Date: Re: Future Objective-C changes
  • Previous by thread: Re: NSImage method problem
  • Next by thread: NSImage cell tanking
  • Index(es):
    • Date
    • Thread