• 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: NSMakeSize and correct type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMakeSize and correct type


  • Subject: Re: NSMakeSize and correct type
  • From: Ron Fleckner <email@hidden>
  • Date: Thu, 12 Mar 2009 23:30:15 +1100


On 12/03/2009, at 11:08 PM, Kevin Walzer wrote:

Hello,

I'm getting these gcc errors:

macicon.m:29: error: incompatible type for argument 1 of ‘NSMakeSize’
macicon.m:29: error: incompatible type for argument 2 of ‘NSMakeSize’

[snip]

-(int) makeIcon: (NSString *) filePath imagewidth: (float *) width imageheight: (float*)height outputfile:(NSString *)imagePath {

[snip]

 //set the icon size
 [resizeicon setSize:NSMakeSize(width, height)];
 [resizeicon  setPixelsWide:(int*) width];
 [resizeicon setPixelsHigh:(int*)height];


Hello Kevin,
Not sure why you're using pointers to floats and ints, but...

Your method's signature says it expects a pointer to float. If that's what you have, then the args to NSMakeSize need to be dereferenced. I think something like NSMakeSize(*width, *height). Unfortunately, I'm not sure about syntax of that, but you could look up dereferencing pointers to find the answer.

HTH,
Ron_______________________________________________

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


References: 
 >NSMakeSize and correct type (From: Kevin Walzer <email@hidden>)

  • Prev by Date: Re: NSMakeSize and correct type
  • Next by Date: NSGradient draws incorrectly in PDF context?
  • Previous by thread: Re: NSMakeSize and correct type
  • Next by thread: NSGradient draws incorrectly in PDF context?
  • Index(es):
    • Date
    • Thread