Hi All, not sure if i'm having aneurysm, but i've always had issues with statements like the following
For some reason, regardless of the content of the nextpageToken string variable, that code still goes inside the first If statement, in this case the nextpageToken is "null", and I have tried different variations such as the Null object as well as the String "null" and as you guys can see I'm even checking the lenght of the string in case the string is empty, in the case where the string lenght is not 0 then the code does what's expected which is to go to the else statement, but when the string comes back as "null" it will obviously still go into the first If statement since the String lenght is greater than 0, not sure if anyone has seen or noticed this before, and before you guys yell at me, please let me know what my error is, or even better, what's the correct way to compare a string is?
Thanks,
Walter
B4X:
If nextpageToken.Length <> 0 Or nextpageToken <> "null" Then
DownloadNextPage(nextpageToken, Common.Token)
Else
If buildList.IsInitialized And buildList.Size > 0 Then
totalrecords = totalrecords + names.Size
lblTotalRecords.Text = "Total Builds: " & totalrecords
'' Log("items: " & names)
'' Log("list size: " & names.Size)
FillList(buildList)
Else
lblTotalRecords.Text = "0 Builds Found"
End If
''B4XLoadingIndicator1.Hide
End If
Thanks,
Walter