Hi All,
I'm developing my first B4XPages (by @Erel) App for my client in order to obtain an Android and a iOS version of the app.
The B4A version app runs correctly without blocking errors, but if I run it in the B4i version it encounters a blocking error that crashes it.
The code that is executed is a shared code (method of a class) between the two projects and it is the following ...
B4A - DEBUG RESULT
'Log ("nids: " & nids)
nids: {value=32
,33
,34
,35
,37
,38
,41
,104}
B4i - DEBUG RESULT
'Log ("nids: " & nids)
nids: (read only map) {, value = "32
\n33
\n34
\n35
\n37
\n38
\n41
\n104";,}
So the point is that in order to work properly the app expects the returned numbers above (32,33,34,35,37,38,41,104) to be separated by a ",".
This code works fine within B4A but within B4i the result isn't the expected:
32\n33\n34\n35\n37\n38\n41\n104";,
Has it happened to any of you too? Please how can I solve this unexpected problem?
thanks in advance 4 your suggestions
Luca.
I'm developing my first B4XPages (by @Erel) App for my client in order to obtain an Android and a iOS version of the app.
The B4A version app runs correctly without blocking errors, but if I run it in the B4i version it encounters a blocking error that crashes it.
The code that is executed is a shared code (method of a class) between the two projects and it is the following ...
B4X:
Sub GetNIDs (nid As Int, aUser As String, aPsw As String) As ResumableSub
Wait For (GetJSONByNID (nid, aUser, aPsw)) Complete (WSResult As String)
Private WSResponse As String = WSResult
Log ("GetSubCatsNIDs | WSResponse " & WSResponse)
If WSResponse = "" Then
Private NoData As List:NoData.Initialize
Return NoData
End If
'PARSE WS RESPONSE
Try
'Check if the response is a valid JSON
Dim parser As JSONParser
parser.Initialize(WSResponse)
Dim JRoot As Map = parser.NextObject
'CUSTOM CODE FOR PARSING
Dim field_elenco_nodi_categorie As List = JRoot.Get(FIELD_SUBCATS_NIDS)
Dim value As String = field_elenco_nodi_categorie.Get(0)
Private nids As String = value.Replace(CRLF, STR_SEP)
Log ("nids: " & nids)
Private arrNIDs() As String '<--- Breakpoint
B4A - DEBUG RESULT
'Log ("nids: " & nids)
nids: {value=32
,33
,34
,35
,37
,38
,41
,104}
B4i - DEBUG RESULT
'Log ("nids: " & nids)
nids: (read only map) {, value = "32
\n33
\n34
\n35
\n37
\n38
\n41
\n104";,}
So the point is that in order to work properly the app expects the returned numbers above (32,33,34,35,37,38,41,104) to be separated by a ",".
This code works fine within B4A but within B4i the result isn't the expected:
32\n33\n34\n35\n37\n38\n41\n104";,
Has it happened to any of you too? Please how can I solve this unexpected problem?
thanks in advance 4 your suggestions
Luca.
Last edited: