ok , thank you !
hello
i just saw an example from google & would like to confirm that is it the same thing which was advised to me?
then on second screen i can call the TinyDB & collect the values using the needed tags
or something like this with "Go Back" button :
screen 1
thanks
Hi
The original sample code already saves the data to TinyDb! All you have to do is put a TinyDb of the same name and same namespace on the other Screen and read the data from there into whatever you wish, via a loop......and the User can hit a "save" button to Save those changes back into TinyDb when they are happy. The save code would be exactly the same as the first screen.
OK !
sorry for the misunderstanding
If you have text boxes as per the first screen, you can populate them with the same code that populates the first screen on App Initialization.
Since so much code is the same, would it be better to just virtualise the toolbar? When the User selects the Edit Screen, hide the First Screen's buttons and show the Edit buttons. Swap them again on return to First Screen - less screens, less code, less components, less hassle?
(needs a cup of tea)
hi @ChrisWard
thank you for this great idea!
i don't know how but it really didn't come to my mind , else i would have done this only
who? me or you
if its me then i had a good sleep this night (i don't need a cup of tea)
thanks
hi
i made all changes with the help of the virtual screen
now my app shows this error:-
if anyone can explain me what this exactly means then that would be really great!
thanks
![:slight_smile: :slight_smile:](https://community.appinventor.mit.edu/images/emoji/google/slight_smile.png?v=9)
It means the code is trying to read a List Item that does not exist. Best not to "hard code" numbers for Loops that read Lists, use "length of list".
Example:
Hi
Can you post the code that triggers the error?
yes , of course
Just a min
So, "ContactPickCount" is just an integer, it doesn't have a length (of list), so perhaps that is the cause of the error message......
-
After Picking, check that the ContactPickCount does not exceed the number of available text boxes (length of List).
-
If it does not, set the values into the text boxes of index number ContactPickCount.
-
If it does - tell the User the number of SOS contacts is exceeded and ask if they want to overwrite an existing contact with the one just picked.
...since this is a contacts editing thing, after picking a contact, you could just ask the User to click the TextBox that the Contact data should populate. That way, the text box list index is never exceeded and the User is calling all the shots directly. Food for thought?
Off topic: This is a Robot made for me by my 3 year old grandaughter Mya:
ok thanks @ChrisWard
i will surely see for it
this is lovely
nice creativity by your granddaughter Mya
PS:- you are my savior
hi @ChrisWard
actually if i remove it then the same problem is faced
........
1 thing again which needs to be noticed :-
See the code needed to be changed(only a bit) when i am taking values from another screen via tinyDB but as per your advice i used "Virtual Screen"
so indirectly there is no change in the blocks , right??
before using the virtual screen , everything worked great
so why not now??
there is no change
except i just applied the "virtual screen method"
u may see the code:-
tq
i again noticed 1 thing which really surprised me!!!
this is SOS button project (unchanged):-
i was really disappointed by the behavior of my app project so i just thought to once check your code (to see whether it worked well or not ) and i know your project has a limit of adding 7 contacts but it shows this error when i try to add the 4th (this did not happened earlier)
i still have spaces to add more but i am not able to in the mobile phone!
and yes u were correct , we must keep testing our app again & again
thanks