Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3677

Pass data from module to webpage

$
0
0

Hello…
On the App event handler (handleUrl)
when the user use the path /check is trigger a method “ModuleData.TriggerCollect”

Var Connection As new MyURLconnection

// 2. Set request headers
Connection.RequestHeader("apikey") = "mykey"
Connection.RequestHeader("Authorization") = "Bearer mykey"

// 3. Send the request asynchronously
Connection.Send("GET", "https://mysite")

On a module.

Property = JsonArray() as auto
MyURLconnection and super as URLConnection.
event handler = ContentReceived.
Inside the Contentreceived

Var jsonData As New JSONItem(content)
GetsupabaseData(jsonData)// create the Jsonitem Array

Method GetsupabaseData

For i As Integer = 0 To records.Count - 1
  Var record As JSONItem = records.Child(i)
  jsonArray.Add (record)
  next
MainPage.addrecords(jsonArray)

My problem is when i try to pass the MainPage.addrecords(jsonArray) i get
NilobjectException.
I am sure i miss something but i don’t know what…
debugging do now anything just a error 0 no message or reason…
any help or point will be appreciated

19 posts - 5 participants

Read full topic


Viewing all articles
Browse latest Browse all 3677

Trending Articles