Re: IPhone- Datasensitive bug from CoreData...
Re: IPhone- Datasensitive bug from CoreData...
- Subject: Re: IPhone- Datasensitive bug from CoreData...
- From: Alexander Spohr <email@hidden>
- Date: Fri, 25 Dec 2009 12:43:48 +0100
Am 25.12.2009 um 06:40 schrieb Brian Bruinewoud:
> I don't understand how the value of 'score' breaks things. If I get rid of the negation in this code:
> int score;
> if( self.isGood ) score = sender.tag;
> else score = - sender.tag;
> everything works fine: adding good and bad to the same person is acceptable.
If you get rid of this what are you doing with that:
> [newDeed setValue: [NSNumber numberWithInt: score] forKey: @"points"];
>
> Any suggestions on what to investigate?
1. Make real classes of your CoreData objects.
2. Just to do something with score try:
int score = [sender tag];
if(![self isGood])
score = -score;
3. Is points in your model broken?
4. Other than that it sounds like a memory problem.
atze
_______________________________________________
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