söndag 4 oktober 2009

Bugs.. Gotta love 'Em :)

Last night I recived a mail from a user of iKeepScore reporting some odd behavior. I booted up my version of iKeepScore, and sure enough the bug was there too. I went to sleep and first thing in the morning I started looking around the code, everything looked ok! Well, to be able to explain the solution I must explain how the app works.

What I have done is that I tagged each cell in iKeepScore with a number from 1 - 108 ( 6 players * 18 cells ) and in the
score calculating code I loop through the cells, adding the numbers together to a total score at the bottom. So this is was basiclly happend : one of the cells had the wrong tag...

So I decided to put the cells tag in the cell. The tag is basicly just a number. If you look to the right you will see two screenshots, the left one is correct, the right one is the one I got the first time. So the bug was this: instead of putting a 6 in cell number
6s tag, I had put 56 there.. and it got better... You can see that the cell where there are supposed to be a 42 is empty? Turns out I put a 41 in
that tag too. That one would have been
really hard for a user to catch, as it adds to the correct column.

I've updated the apps and sent in them to the Apple review team, expect the update to be released in about 3 weeks!

Inga kommentarer:

Skicka en kommentar