2014년 12월 3일 수요일

deleting from tinyDB?

Hey guy's,i have a small app that stores clients,and lists all store values to view.

once im in the view i can't seem to be able to delete the item..

if i have a tag called txtName so i but a button clear tag=txtName

but seems to work but the main tag stays in the list when i load it it says error nothing to load but the tag name shows in txt box...

 i tried also clear all tag..but no success




You're using two different things for that tag... you're getting the name list first in screen,initialize.  That's OK

Then, in After.Picking, you're doign way too much work for no reason at all.  Get the tag from the TinyDB ONCE... that will go to a lit.  Once it's in the list, set the items to the items in the list you got from the one call to the TinyDB.  Calling it 3 times is silly.

You show the button1del.click, you show that you're clearing all tags... Not sure why.  In any case, if you want to clear the ONE tag, you have to HAVE that tag in the TinyDB.  And I see where you're saving the tag.

BUT... In After.Picking, you have to refresh the global nameList with the contents of the TinyDB, which are now different than they were before...  

Also, read my tips from the links below, and read the section about redundancy (probably a good idea to read ALL of the tips!):



댓글 없음:

댓글 쓰기