Im using the 'Table Class' to make a table.
When i run the App using 'Debug' the table fills ok but when i use 'Release' nothing happens all i get is the heading and no data???????
When i run the App using 'Debug' the table fills ok but when i use 'Release' nothing happens all i get is the heading and no data???????
B4X:
Sub Process_Globals
Dim ResultElements As XOMElements
End Sub
Sub Globals
Dim Table1, Table2 As Table
End Sub
Sub Activity_Create(FirstTime As Boolean)
Table1.Initialize(Me, "Competition Results",4)
Table1.AddToActivity(Activity, 0, 0dip, 100%x, 100%y)
Table1.SetHeader(Array As String("Position", "Band Name", "Composer", "Col3"))
If ResultElements.IsInitialized=False Then
Dim XOMBuilder1 As XOMBuilder
XOMBuilder1.Initialize("XOMBuilder1")
XOMBuilder1.BuildFromURL("http://www.bishmedia.co.uk/default/Apps/xmldata.xml", Null)
Else
BuildListView
End If
Table1.SetColumnsWidths(Array As Int(20%x, 30%x, 30%x, 20%x))
End Sub
Sub XOMBuilder1_BuildDone(XOMDocument1 As XOMDocument, Tag As Object)
If XOMDocument1=Null Then
' XOMDocument1 will be Null if an error has occurred
Log("An error has occured and the XOMDocument has NOT been created")
' now handle the failure to get and parse the XML
Else
Log("XOMDocument successfully created")
Dim RootElement As XOMElement=XOMDocument1.RootElement ' this will be the <datas> element/tag
Dim CompElement As XOMElement=RootElement.GetFirstChildElementByName("comp")
Dim ResultElements As XOMElements=CompElement.GetChildElementsByName("result")
BuildListView
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub BuildListView
Dim i As Int
Dim ListTitle As String
Dim ResultElement As XOMElement
'****************************************
'Pre test variables
For i=0 To ResultElements.Size-1
ResultElement=ResultElements.GetElement(i)
ListTitle=ResultElement.GetFirstChildElementByName("bandName").value
Table1.AddRow(Array As String(ListTitle, "ccc", "ddd", "eee"))
Next
End Sub