Re: Weird CGFloat issue
Re: Weird CGFloat issue
- Subject: Re: Weird CGFloat issue
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sun, 18 Apr 2010 19:54:19 +0200
Le 18 avr. 2010 à 19:26, Gideon King a écrit :
> Hi all,
>
> I'm having a really strange problem with a simple method call:
>
> CGFloat newMin = 150.0f;
> CGFloat newMax = 0.0f;
> [mapContentSubview setMinDimension:newMin andMaxDimension:newMax];
>
> The method is defined as:
>
> - (void)setMinDimension:(CGFloat)newMinDimension andMaxDimension:(CGFloat)newMaxDimension;
>
> But when I look at what's coming in as the new min dimension, it is 807.000122, and not 150.0 as expected.
>
> If I call it like this:
>
> [mapContentSubview setMinDimension:150.0f andMaxDimension:newMax];
>
> or
>
> [mapContentSubview setMinDimension:150.0 andMaxDimension:newMax];
>
> the min dimension value at the other end is 5.5607842581234111e-315.
>
> I'm sure there is just some simple typing problem, but I'm just not seeing it.
>
> Any ideas?
>
Look like a problem where the method declaration does not match exactly the definition (or you call the method without having imported the header and the compiler don't know the method signature).
-- Jean-Daniel
_______________________________________________
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