On 12/03/2009, at 11:08 PM, Kevin Walzer wrote:
-(int) makeIcon: (NSString *) filePath imagewidth: (float *) width
imageheight: (float *)height outputfile:(NSString *)imagePath;
@end
@implementation MacIcon
-(int) makeIcon: (NSString *) filePath imagewidth: (float *) width
imageheight: (float*)height outputfile:(NSString *)imagePath {
float* means "pointer to float", so width and height are pointers....
[resizeicon setSize:NSMakeSize(width, height)];
...and NSMakeSize() does not want pointers, it wants the real thing,
<float>.
[resizeicon setPixelsWide:(int*) width];
[resizeicon setPixelsHigh:(int*)height];
This is also wrong. You are casting a "pointer to float" (float*) to a
"pointer to int" (int*). setPixelsWide: expects just an int.
You might be a bit confused about declaring pointer types in C, so
review your favourite reference on the topic.
The correction would probably be to simply get rid of the '*' for the
various float and int parameters.
--Graham
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com