Good day to all - just joined this group coming from AICoffeeShop,
thanks for the invitation (Tony and Gary).
My query is around the TWDB and iterated calls not doing what I was
expecting. A bit of a cut and paste from AICS follows:
I'ev been using AppInventor for a few days now gone through a few
tutorials and have started developing my own. But am coming up against
a problem which is pretty frustrating and I am sure there is a simple
answer to it. My current TinyWebDB set-up is designed for text fields
in the AppEngine. I am using 1 master list/tag which stores a list of
names, then each name has it's own tag and series of values.
One program I have enters data into this configuration and works
fine.
The user program is set to access the TinyWebDB and download the
latest data (bulk download) on request and store data in the TinyDB.
The problem I am coming up against is while running through each value
in the master list and individually making a call to TinyWebDB for
each value.
I have tried [For Each] unsuccessfully, another config uses a [For
Range] loop based on a copy of the master list, then choosing each
value in the master list from the index (loop value) making a call to
TinyWebDB - and in that GotValue procedure I am deleting the value
from the list. Unfortunately only the last value in the Master List
gets read from TinyWebDB.
I have tried to set-up a check for [ while length of list > 0 ] run
the TinyWebDB retrieving procedure, but the system locks up? tried
including [for each] loops to hold the system up while waiting for the
got value response....
Any ideas? my TinyWebDB.GotValue event uses If controls checking tag
against what I am sending to TinyWebDB - It looks like the For Range
loop is running and the next call to TinyWebDB cancels the previous
one, therefore only leaving me with the last item in the master list
being downloaded.
https://picasaweb.google.com/layolayo/Shared?authuser=0&authkey=Gv1sRgCIGg5IH9sMjBCw&feat=directlink
I have managed to get this working with a button and a check on the
length of the copied main list. Then using the value from item at
index 1 - I make a call to twdb, and then delete the value at index 1
- the button is then updated with ( "x lists left to update" ) once
all lists are updated (i.e. copied list is empty) the user can
continue... a bit of a work around, but operational. This is fine when
I only have 3 or 4 items in the Main List. If this grows, and it
will ! It will become slightly annoying for the user.
Maybe the issue is with my logic, I am looking at this from the
following angle:
tag: Main List
values: Tea-a, Tea-b, Tea-c
tag: Tea-a
values: Darjeeling, 5/10, great with milk
tag: Tea-b
values: English Breakfast, 9/10, have with porridge
tag: Tea-c
values: Ceylon, 1/10, doesn't go with anything
In the admin screen - a new tea is added and then all the details are
filled in - the Main List then becomes the holder for the ListPicker.
A requirement is the functionality of using the indexes of the Tea-a,
Tea-b lists to control the UI.
First impressions would suggest (at least to me) that the original
blocks would handle this...
**>>Happy New Year <<**
Layolayo