Spanish Problema con HttpUtils y parser.Initialize

krewer

New Member
Hola amigos, tengo un problema...

Estoy haciendo el tutorial de widgets que hay aqui

B4X:
Sub Service_Create
    'configure the widget and set it to update every 24 hours (1440 minutes).
    rv = ConfigureHomeWidget("WidgetLayout", "rv", 1440, "Quote of the day")
    HttpUtils.CallbackActivity = "WidgetService"
    HttpUtils.CallbackUrlDoneSub = "UrlDone"
    HttpUtils.CallbackJobDoneSub = "JobDone"
    parser.Initialize
    
    'Load previous data if such is available.
    'This is relevant in case our process was killed and now the user pressed on the widget.
    If File.Exists(File.DirInternalCache, QUOTES_FILE) Then
        raf.Initialize(File.DirInternalCache, QUOTES_FILE, True)
        quotes = raf.ReadObject(0)
        raf.Close
    Else
        quotes.Initialize
    End If
    If File.Exists(File.DirInternalCache, CURRENTQUOTE_FILE) Then
        currentQuote = File.ReadString(File.DirInternalCache, CURRENTQUOTE_FILE)
    End If
End Sub

Cuando llego a esta parte y trato de compilar me dice lo siguiente

Error description: Undeclared variable 'parser' is used before it was assigned any value.

Error description: Undeclared variable 'httputils' is used before it was assigned any value.

Hice todos los pasos que salian ahi pero no puedo hacerlo funcionar
 

walterf25

Expert
Licensed User
Longtime User
Opinion

A mi me parece que no has definido la variable parser, necesitas bajar la libreria parser y luego definiarla en Sub Process_Globals

asi:

B4X:
Sub Process_Globals
Dim Parser As SaxParser
End Sub

salud!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…