On 29/04/2010, at 5:45 AM, Raffael Cavallaro wrote:
>
> On Apr 28, 2010, at 3:31 PM, Quincey Morris wrote:
>
>> So my original point stands: I want my original bit pattern back again after
>> unarchiving, and I don't believe that a finite decimal string will guarantee
>> that.
>
> As a practical matter, a simple test shows that converting the point:
>
> 3.141592653589793, 3.141592653589793
>
> using NSStringFromPoint gives you the string:
>
> "{3.14159, 3.14159}"
>
> so, yeah, you're not getting what you want.
Hmm, that's worse than I thought (I could have sworn it used substantially more
precision than that!).
Really, the OP's best bet is to make his original class NSCoding compliant and
archive it directly, then he can use -encodePoint:forKey:. Going the
string-wrapper route now looks more trouble than it's worth, though Clark Cox's
solution would do it.
--Graham
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]