Hi I need some help with storing info on a TInyDB.
I am making an app and I have a spinner, datepicker and timepicker:
1) on the spinner I have a list of subjects for people to chose from, on the datapicker they choose the date they want and the timepicker they want to.
2) Then I have a Save button and when I click the save button, all the info saves that they put in the datapicker, spinner and timepicker.
3)How to clear the info that they have saved?
Could somebody help me please, I have know idea what blocks to use or how to do it.
--
You screen looks nice Jennifer and it is a start.
Have you done the MIT tutorials?
Have you read the free ebook?
These resources teach you how to program with AI2 blocks and provide materials that would help you solve your problem.
Here is a big hint: TinyDB
ABG's example Build Your Own DB - Part 1 demonstrates filtering
Stephen's example TinyDB - a persistent data solution that may help you.
Do the tutorials mentioned below. Several of the tutorials explain how to use the the tools you will need for your project.
The ebook teaches you how to program AI2 and also has valuable information.
MITs tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html
AI2 free online eBook http://appinventor.mit.edu/explore/ai2/tutorials.html ... the links are at the bottom of the Web page.
Do you need more help? The following explain what the controls can do and how the blocks work:
When you start using the blocks, ask again, post a jpg or png screen capture of your blocks and someone will provide advice.
--
Can you look at my code please, because I can't get my cancel button to work, I want it to do, when that person click on to see who you have saved, and if they don't want that booking any more they can cancel it.
Thank you for the resources that you have gave me it has helped me alot.
--
Be aware the restBlock procedure does not remove or reset anything in the TinyDB. Is it supposed to reset your spinners and date picker? Use the DoIT debugger to make sure it is setting them to the current values of those objects
No where do I see a block in the Cancel button (restBlock procedure) that changes the database entry for the person cancelling although it is changing the values in the controls. I think you need additional code in the restBlock block that looks similar to the code you wrote for the ReserveButton.Click event handler. You need to either remove the tag associated with the individual from the database (cleartag) or set all the values within the database for that person/computer to their default values. This is a best guess.
Does that make sense? Be aware your restBlock procedure does not remove or reset anything in the TinyDB. It just resets your spinners
--
Jenny replied by email.
Thank you for your help.
Jenny
A reminder for all forum users: Please make all responses to your posts and comments in the forum. Please do not send emails. Thank you.
--
Hi, can you look at my code again please I have made alterations to it but my cancel button still won't work.
code blocks new.docx
code blocks new.docx
--
댓글 없음:
댓글 쓰기