2014년 12월 7일 일요일

Remove List Item by Price

Hi. I'm working on the Amazon at the Bookstore app like displayed here: http://www.appinventor.org/apps/amazon/amazon.pdf I have already completed the app that's displayed in this example but my professor wants us to expand it by being able enter in a maximum price and making it so the app displays only products cheaper than that, but I can't figure out how to do that. If anybody can explain how to remove items by price, it would be greatly appreciated.
Also, I'm using Appinventor 2 (I know the example is in Appinventor Classic. I didn't need an example to figure out those steps.)



Retrieve them all to a list, and then go through each item in the list in a for each loop .  If you come to one that meets the criteria, append it to another list... go through the entire retrieval list and whatever's left in the appended list is what matches your criteria.



HOW TO FILTER -


Write your own WHERE_LT to filter less than,
following the pattern for WHERE_EQ().


댓글 없음:

댓글 쓰기