iOS Question ImageDownloader

MarcoRome

Expert
Licensed User
Longtime User
Hi, i have this code:

B4X:
Dim m As Map
                    m.Initialize
                    m.Put(ImageView1, "https://www.devil-app.eu/xxxxxxx/pizzerie/"& m.Get("logo_pizzeria"))
                    Downloader.Download(m)

In this way i have this message:

if i write the code so:

B4X:
Dim foto As String = "https://www.devil-app.eu/xxxxxxx/pizzerie/"& m.Get("logo_pizzeria")
                  
                    Dim m As Map
                    m.Initialize
                    m.Put(ImageView1, foto)
                    Downloader.Download(m)

work.
I dont understand why
 

MarcoRome

Expert
Licensed User
Longtime User
What is the output of Log("m: " & m.Get("logo_pizzeria"))?

Based on the error message there is no such item in the map.

I wrote that in this mode:
B4X:
Dim foto As String = "https://www.devil-app.eu/xxxxxxx/pizzerie/"& m.Get("logo_pizzeria")
                  
                    Dim m As Map
                    m.Initialize
                    m.Put(ImageView1, foto)
                    Downloader.Download(m)

Work.

Don work
if i use this code:

B4X:
 m.Put(ImageView1, "https://www.devil-app.eu/xxxxxxx/pizzerie/"& m.Get("logo_pizzeria"))
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
This isnt null. I copy only a part code. For sure m.Get("logo_pizzeria") have a value infact... if i put the value in variable (foto) work:

but if i assign the variable in direct mode no.

m.Put(ImageView1, "https://www.devil-app.eu/xxxxxxx/pizzerie/"& m.Get("logo_pizzeria"))


The m.Get("logo_pizzeria") have value by a select

B4X:
ExecuteRemoteQuery($"Select logo_pizzeria from pizzeria_xxxx where id_utente = ${Main.id_pizzeria}"$,"CaricoLogo")

....JobDone

        Case "CaricoLogo"
                Dim VERIFICA As List
                Dim m As Map
                m.Initialize
                VERIFICA = parser.NextArray 'returns a list with maps
                If VERIFICA.Size > 0 Then
                    m = VERIFICA.Get(0)
                    Dim foto As String = "https://www.devil-app.eu/devil-app.eu/pizzerie/"& m.Get("logo_pizzeria")
                   
                    Dim m As Map
                    m.Initialize
                    'm.Put(ImageView1, "https://www.devil-app.eu/devil-app.eu/pizzerie/"& m.Get("logo_pizzeria"))
                    m.Put(ImageView1, foto)
                    Downloader.Download(m)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…