Hi all. I have this code that reads a record from mysql and returns a string and its link to retrieve image from the site.
Example row 1 i have column "descrizione" and column "immagine"
Record 1:
descrizione = "dog"
immagine = "dog.jpg"
Record 2:
descrizione = "cat"
immagine = "cat.jpg"
etc.
Now all work but order "descrizione" is right and order "immagine" il random.... yes random because isn't order and if you run app more time change order in random mode.
This is code:
Any idea ?
Thank you
Marco
Example row 1 i have column "descrizione" and column "immagine"
Record 1:
descrizione = "dog"
immagine = "dog.jpg"
Record 2:
descrizione = "cat"
immagine = "cat.jpg"
etc.
Now all work but order "descrizione" is right and order "immagine" il random.... yes random because isn't order and if you run app more time change order in random mode.
This is code:
B4X:
Case LEGGI_TATTOO_LISTA
'Carico immagini da Server
Dim COUNTRIES As List
Dim m As Map
m.Initialize
COUNTRIES = parser.NextArray 'returns a list with maps
sistemiamo_icone = 1
incrementa_i = -1
Dim totale_righe As Int = COUNTRIES.Size - 1
totale_righe_da_carciare = COUNTRIES.Size - 1
Dim pnl As Panel
For i = 0 To COUNTRIES.Size - 1
m = COUNTRIES.Get(i)
'Per Internet
descrizione_array(i) = m.Get("descrizione")
posizione_i = i
Dim job3 As HttpJob
job3.Initialize("Job3", Me)
job3.Download("http://www.xxxx.com/pictures/" & m.Get("immagine"))
Next
Case "Job3"
'Carico immagini da Server
Dim totale_righe As Int = totale_righe_da_carciare
incrementa_i = incrementa_i + 1
'Per Internet
lbl_test = descrizione_array(incrementa_i)
Dim bm As Bitmap
bm.Inizialize3(Job.GetBitmap)
........
Any idea ?
Thank you
Marco