I've resumed for some changes an application developed with version 6.50. With version 6.50 worked smoothly
By compiling the same with version 7.01 I noticed that the FTP_DeleteCompleted event is not executed ( also if i add a break in debug, see where i write "'Here i add Break" )
Original Code:
After trying several times to run this part of the code i added Wait for:
So work without problem.
But the question is why doesn't work the event in the "old way" ?
Thank you
Marco
By compiling the same with version 7.01 I noticed that the FTP_DeleteCompleted event is not executed ( also if i add a break in debug, see where i write "'Here i add Break" )
Original Code:
B4X:
If Starter.tipo_foto = "front" Then
If carico_front_picture = False Then
Chooser.Initialize("chooser")
Chooser.Show("image/*", "Select Picture")
Else
'Invio tramite FTP
FTP.Initialize("FTP", "ftp.xxxx", 21, "yyyyyuser", "pwuser")
FTP.DeleteFile("/hotelguru/" & filenameresize )
If vp.IsInitialized Then 'Here i add Break
vp.DestroyEngine
vp.Initialize("vp",False)
pnl_foto.AddView(vp, 0, 0, pnl_foto.Width, pnl_foto.Height)
vp.CompressQuality = 100
vp.ZoomEnabled = False
vp.Transition = vp.Transition.CubeHorizontal
vp.ProgressBarVisible = True
End If
btn_upload_Click
End If
End If
Else
'SE ROOM
Chooser.Initialize("chooser")
Chooser.Show("image/*", "Select Picture")
End If
End Sub
.....
Sub FTP_DeleteCompleted(ServerPath As String, Success As Boolean)
Log("FTP_DELETE: " &ServerPath & ", Success=" & Success)
If Starter.tipo_foto = "front" Then
ExecuteRemoteQuery($"DELETE FROM hotelguru_picture where photo_room = '${filenameresize}'"$,"cancellafoto")
filenameresize = ""
carico_front_picture = False
Else
Log($"DELETE FROM hotelguru_picture where photo_room = '${foto_selezionata}'"$)
ExecuteRemoteQuery($"DELETE FROM hotelguru_picture where photo_room = '${foto_selezionata}'"$,"cancellafoto")
foto_selezionata = ""
End If
FTP.Close
End Sub
After trying several times to run this part of the code i added Wait for:
B4X:
If Starter.tipo_foto = "front" Then
If carico_front_picture = False Then
Chooser.Initialize("chooser")
Chooser.Show("image/*", "Select Picture")
Else
'Invio tramite FTP
FTP.Initialize("FTP", "xxxx", 21, "userxxxx", "pwuserxxxxx")
FTP.DeleteFile("/hotelguru/" & filenameresize )
Wait For FTP_DeleteCompleted(ServerPath As String, Success As Boolean)
If Success Then
Log("FTP_DELETE: " &ServerPath & ", Success=" & Success)
If Starter.tipo_foto = "front" Then
ExecuteRemoteQuery($"DELETE FROM hotelguru_picture where photo_room = '${filenameresize}'"$,"cancellafoto")
filenameresize = ""
carico_front_picture = False
Else
Log($"DELETE FROM hotelguru_picture where photo_room = '${foto_selezionata}'"$)
ExecuteRemoteQuery($"DELETE FROM hotelguru_picture where photo_room = '${foto_selezionata}'"$,"cancellafoto")
foto_selezionata = ""
End If
FTP.Close
If vp.IsInitialized Then
vp.DestroyEngine
vp.Initialize("vp",False)
pnl_foto.AddView(vp, 0, 0, pnl_foto.Width, pnl_foto.Height)
vp.CompressQuality = 100
vp.ZoomEnabled = False
vp.Transition = vp.Transition.CubeHorizontal
vp.ProgressBarVisible = True
End If
btn_upload_Click
End If
End If
Else
'SE ROOM
Chooser.Initialize("chooser")
Chooser.Show("image/*", "Select Picture")
End If
End Sub
So work without problem.
But the question is why doesn't work the event in the "old way" ?
Thank you
Marco
Last edited: