Re: NSMakeSize and correct type
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