View Single Post
  #5 (permalink)  
Old February 5th, 2010, 11:18 AM
Powersword Powersword is offline
Registered User
 
Join Date: Feb 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 6 Todo List removeItem

Hi guys

I am new to this. I noticed that the last message was posted sometime ago. Just want to know if the problem was solved because I am encountering the same problem.

Anyway I have found out that the reason why sometimes the "remove" worked and sometimes it won't. It is due to the SQLite Database having a different row Id value compared with the chosen menu item position value. The row ID of the database only increases. It won't decrease even if the item is removed. So for example after 100 clicks the row ID in the DB will have increased to 100. If your list happen to have for e.g 6 items. Passing in the positions of this 6 items (value of 1 to 6) may not necessary match to row ID of the DB where this 6 items are stored.

One way to solve this is as mentioned to store the row ID used by SQ Lite database in the item. However I can't see how it can be done yet.

Appreciate if anyone has any suggestions.
Reply With Quote