French Help for a very very beginner

faure

Member
Licensed User
Longtime User
my first program :


when compiling I have this message
error description : undeclared variable httputils is used
before it was assigned any value
error line 39

(library http id loaded)



the program :

'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim b4a As String
b4a = "http://www.faurejr3.com"
End Sub


Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub

Sub Activity_Create(FirstTime As Boolean)

HttpUtils.CallbackActivity= "main" ' line 39
HttpUtils.CallbackJobDoneSub ="JobDone"
HttpUtils.download("job1",b4a)
Log("hello")
Msgbox ("hello"+ b4a,"first")

End Sub

Sub Activity_Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
End Sub


Sub JobDone(Job As String)
Dim s As String
If HttpUtils.issuccess(b4a) Then
s= HttpUtils.getstring(b4a)
End If
End Sub
 

klaus

Expert
Licensed User
Longtime User
HttpUtils is not a library but a code module.
You need:
- to check the Http library in the Libs Tab (seems you have already done it)
- add the HttpUtils module in the IDE menu Project / Add Existing Module
- add the HttpUtilsServic module, same procedure as above.

Best regards.
 

faure

Member
Licensed User
Longtime User
more

grace à erel et klaus j'ai bien avancé
ok pour les 2 modules http
je veux télécharger un fichier d'un site ftp
ok pour url
mais que signifie job et jobname ??
ou indique t-on le nom du fichier (dans dowlist)
merci par avance
 

faure

Member
Licensed User
Longtime User
very simple !!

bonjour
je ne woudrais pas abuser de votre serviabilité ...


mon petit problème :

Dim s As String
Dim m As Long

If HttpUtils.IsSuccess(b4a) Then

s= HttpUtils.GetString(b4a)

m= length(s)

Msgbox (m,"resultat" )

End If


---- > message lenght n'est pas défini
 
Top