NSNumber negative or positive in TableView?
NSNumber negative or positive in TableView?
- Subject: NSNumber negative or positive in TableView?
- From: Trygve Inda <email@hidden>
- Date: Thu, 24 Jul 2008 11:09:38 +0000
- Thread-topic: NSNumber negative or positive in TableView?
I have a tableView with one column containing an NSNumber. This tableView is
bound to an array and an arrayController is used as well.
In the case of the unsigned NSNumber 2481864868 (signed -1813102428)...
Sometimes when I load my array from the plist it shows up as the positive
value, and sometimes the negative value. It seems quite random.
My arrayController has a binding for the content and I load my array from
the plist into this variable.
When I look in the plist editor (the array is written to a plist), the value
is always negative.
I need to use the positive value in my code so I use:
[[dict objectForKey:@"myVal"] unsignedLongValue]
When I set values into the array I use:
[dict setObject:[NSNumber numberWithUnsignedLong:myVal] forKey:@"myVal"];
When I do this the value in the table shows up correctly as a large positive
value.
So how do I force my table to always show the positive one when it initially
loads?
Thanks,
Trygve
_______________________________________________
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