Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 48

AussieRyan
Aspiring developer
Profile
Posts: 148
Reg: Mar 21, 2012
Margate, QLD Au...
1,480
01/14/14 10:06 PM (11 years ago)

Checklist plugin - error?

I have the Checklist plugin installed and configured - Latest SH, updated plugins. I am using an external JSON file, that loads and displays OK. I have the screen set for user edits NO. If I change the contents of the file, or change to a completely different file, the checklist items are added to, not replaced in the database. It appears that the database is not being replaced/updated when the checklist is opened. This seems to be the normal behaviour if user edits is YES. Could the database be deleted/cleared when user edit is NO and the screen is opened? Hope this makes sense
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
01/14/14 10:09 PM (11 years ago)
Thanks - I just saw the forum post. I'll get working on this.
 
AussieRyan
Aspiring developer
Profile
Posts: 148
Reg: Mar 21, 2012
Margate, QLD Au...
1,480
like
01/14/14 10:09 PM (11 years ago)
That was quick
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
01/14/14 10:36 PM (11 years ago)
Okay - took a quick look at it. The problem is that if you delete everything when user edits is "no", then it also deletes the items the user has checked off. Even worse, it does this every time the screen is loaded, so it looks like the checkmarks are never saved. I think the best approach will be to do a check against the existing data to see if the items need to be changed, rather than always deleting and adding. But, that will take a bit more work so it will take a bit more time.
 
AussieRyan
Aspiring developer
Profile
Posts: 148
Reg: Mar 21, 2012
Margate, QLD Au...
1,480
like
01/14/14 10:50 PM (11 years ago)
I can see the difference. It would be better to maintain the state of the checkmark. I have been holding adding this for a client who wants to use the app for a plane checklist. I can actually see benefits for both of your options, but maintaining the state could be the better solution, if there was also a button for the user to clear the checkmarks (perhaps located in the nav bar top right). Thanks
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.