carlos a matheus hung

unread,
Jan 21, 2015, 12:46:38 PM1/21/15
to mitappinv...@googlegroups.com
Hi everyone,

I´m trying to create a Recipe book using checkboxes. The idea is that the user can be able to pick up three ingredients, so the app will search recipes according to the selection that I want to storage in the sd memory. I have created a code but it doesn´t work at all. Nothing happen. Any one can take a quick look at to the screenshot attached in this message and tell me what I´m doing wrong, please?

Cheers to all

Carlos  
Captura de pantalla 2015-01-21 a las 13.10.49.png

Aubrey Colter

unread,
Jan 21, 2015, 12:57:40 PM1/21/15
to
Hello Carlos,

See the documentation for the select a list item here: http://appinventor.mit.edu/explore/ai2/support/blocks/lists.html#selectlistitem

You need to give the index a number, not a variable. You'll need to give it a number between 1 and 4, for whichever kind of rice you want to select.

However, what I think you actually want to happen is:
set ListView1.Elements to get global recetaarroz
set arrozbtn.Checked to true/false (NOT A LIST ELEMENT). (I actually don't know what you want to happen here. You already know, from this IF clause, that arrozbtn.Checked = true).

Good luck and happy apping!
Aubrey

Aubrey Colter

unread,
Jan 21, 2015, 4:56:09 PM1/21/15
to
Hello Carlos,

Please continue to post your questions in the forum.

Hi Aubrey,
You are right. I changed the listview component. I put a listpicker instead. It is working. Now I have another question. 
Once the app shows the recipe found using the combination of two ingredients, how can I read the recipe? 
Please, can you look at this code?
Cheers again   

 
 Where is the recipe that has been selected? Is it a file? Is it a text string? The code snippet that you sent doesn't have any code to show a recipe. You will need to use the listpicker after picking function.
Captura de pantalla 2015-01-21 a las 17.19.44.png
Reply all
Reply to author
Forward
0 new messages