It was really enjoyable to do the app this week. I'm finding it easier and easier to anticipate problems and debugging is also becoming easier. For this app I also tried to be more detailed in organizing the components and behaviors before beginning - and it certainly helped in building the app. Planning and step-by-step testing is proving to be of utmost importance.
One of the major challenges I had was in putting together the Listpicker for the multiple choice quiz in level one. The challenges that needed to be solved were the following:
1. The "I don't know" option, the correct answer as well as two random words from the overall answers list needed to be displayed as the Listpicker elements
2. None of these items should be duplicated (for example, choosing a random item from the list may cause the correct answer to show up twice, etc...)
3. The order of the items had to be random each time (I didn't want the correct answer to always appear as option one, etc)
4. If the "back" button was pressed before selecting an option from the listpicker, and then "select answer" was pressed again, two lists (with a total of 8 options) was shown - this bug, of course, needed to be fixed
Solving these issues proved quite challenging for me but in the end I solved them in the following manner:
- I copied the existing answer list to a new temporary list, then chose the correct answer (using the current index) from the list and added it to a hidden label component. Then I removed that item from the temporary list and used the "pick random item" block to choose the next item, which was put into a second hidden label and again, removed from the temporary list. The third item was chosen in a similar manner. By removing the previously chosen item before randomly selecting a new one, I avoided duplications. This solved points 1-2 from above.
- To solve point three, I added the 3 hidden label texts to another temporary list (this one would be used for the Listpicker Elements). I again used the "pick random item" and "remove item" blocks to transfer the items into this new temporary list. This made sure that the items would be in a random order in the final list which would be used for the Listpicker elements. Finally, I added the "I don't know" option, as I wanted this to always appear last in the list of possible answers.
- In order to solve the "back pressed" problem, I first coded the "select answer" listpicker component to remove all of the elements from each of these temporary lists and labels before adding new items. That way, each time the Listpicker is pressed, it begins with a clean slate. To do this successfully, I had to play around with the "For Range" block - but eventually I got it to work properly!
Other than this, I have decided what I want to concentrate on for my final project. I want to create a really good flashcard app. As a language teacher, I often recommend that my students use a flashcard app to store their new vocabulary. But I have yet to find a flashcard app that is both pleasantly designed, free, functional, flexible and user-friendly. Creating a flashcard app with allow me to use so many of the features I have already learned as well as some new ones (perhaps a tiny webdb to share flashcard stacks, etc). I'm really excited about it!!!!
One of the major challenges I had was in putting together the Listpicker for the multiple choice quiz in level one. The challenges that needed to be solved were the following:
1. The "I don't know" option, the correct answer as well as two random words from the overall answers list needed to be displayed as the Listpicker elements
2. None of these items should be duplicated (for example, choosing a random item from the list may cause the correct answer to show up twice, etc...)
3. The order of the items had to be random each time (I didn't want the correct answer to always appear as option one, etc)
4. If the "back" button was pressed before selecting an option from the listpicker, and then "select answer" was pressed again, two lists (with a total of 8 options) was shown - this bug, of course, needed to be fixed
Solving these issues proved quite challenging for me but in the end I solved them in the following manner:
- I copied the existing answer list to a new temporary list, then chose the correct answer (using the current index) from the list and added it to a hidden label component. Then I removed that item from the temporary list and used the "pick random item" block to choose the next item, which was put into a second hidden label and again, removed from the temporary list. The third item was chosen in a similar manner. By removing the previously chosen item before randomly selecting a new one, I avoided duplications. This solved points 1-2 from above.
- To solve point three, I added the 3 hidden label texts to another temporary list (this one would be used for the Listpicker Elements). I again used the "pick random item" and "remove item" blocks to transfer the items into this new temporary list. This made sure that the items would be in a random order in the final list which would be used for the Listpicker elements. Finally, I added the "I don't know" option, as I wanted this to always appear last in the list of possible answers.
- In order to solve the "back pressed" problem, I first coded the "select answer" listpicker component to remove all of the elements from each of these temporary lists and labels before adding new items. That way, each time the Listpicker is pressed, it begins with a clean slate. To do this successfully, I had to play around with the "For Range" block - but eventually I got it to work properly!
Other than this, I have decided what I want to concentrate on for my final project. I want to create a really good flashcard app. As a language teacher, I often recommend that my students use a flashcard app to store their new vocabulary. But I have yet to find a flashcard app that is both pleasantly designed, free, functional, flexible and user-friendly. Creating a flashcard app with allow me to use so many of the features I have already learned as well as some new ones (perhaps a tiny webdb to share flashcard stacks, etc). I'm really excited about it!!!!