Please help with storing data to TinyDB.
It is behaving strangely!
What appears on tinyDB using listview is different depending on the Text of “DynamicActivityButton” and whether I am using global variables (left) or replace it with “Local Variables” (Right)
If I create 2 card views, with 2 different dynamic buttons, and whether it is local or global variables, the stored data are different! For example:
Local Variable, Dynamic Button 1 (“Hi”), Button 2 (“Pear”), Button press sequence (Hi, Pear, Pear, Hi):
Result in TinyDB: Pear, Pear (ALWAYS!) (No “Hi” stored).
Local Variable, Dynamic Button 1 (“Yo”), Button 2 (“Mama”), Button press sequence (Yo, Mama, Mama, Yo):
Result in TinyDB: Yo, Yo (ALWAYS!) (No “Mama” stored).
Look at the pattern! I can’t explain the behavior, because I did not do any alphabet or word recognition codes. So strange…
Global Variable, Dynamic Button 1 (“Hi”), Button 2 (“Pear”), Button Press sequence (Hi, Pear, Pear, Hi):
Result in TinyDB: Hi, Pear, Pear (notice no “Hi”!) (Always!)
Global Variable, Dynamic Button 1 (“Yo”), Button 2 (“Mama”), Button Press sequence (Yo, Mama, Mama, Yo):
Result in TinyDB: Yo, Mama, Mama, Yo (no Problem!) (Always!)
Thanks so much Taifun. I missed the mutators of the local variable initialization thing.
And After I put the TinyDB list view on the same screen, there seems to be no problem. When I dedicate a screen to the TinyDB Listview, that’s where I am missing some words. Strange, or maybe I am missing something. I am suspecting that I missed the words due to some background lag. Some words, even with the same number of alphabets takes longer to store, I guess.
I see. Thank you for the tip about screens. Then I don’t know how to reconcile the fact that some clicks of my buttons don’t register into TinyDB when on a different screen. It seems to magically choose specific words to do weird stuff to. Or more specifically, different alphabets because the length of string doesn’t seem to be the cause. But you are right, lagging should be indiscriminate towards alphabets, so it can’t be lagging. But neither should a screen change. So, I’d put that up as a mystery.