Bug? Map information cannot be displayed during debugging

cxbs

Active Member
Licensed User
Longtime User
The same program can display map information normally when debugging in version 9.8

NoShowMap.png
 

Attachments

  • NoShowMap.zip
    9.1 KB · Views: 159

cxbs

Active Member
Licensed User
Longtime User
This is the normal display of map information when debugging in b4a9.8
ShowMap.png
 

cxbs

Active Member
Licensed User
Longtime User
Dear Mr. Erel, this problem appeared after the upgrade of version 9.8. I sincerely hope to help solve this problem. Thank you very much!
 

aeric

Expert
Licensed User
Longtime User
Second way is don't use ResumableSub.

B4X:
Private Sub GetList As List
    Dim Result As List
    'Dim JSON As JSONParser
    'Dim jsonstr As String
    ''jsonstr="[{""0"":""KA001"",""1"":""KA002"",""Rcnt"":2,""Fcnt"":2,""Err"":""""},{""0"":""5103"",""1"":""212029""},{""0"":""5103"",""1"":""211710""}]"
    'jsonstr = $"[{"0":"KA001", "1":"KA002", "Rcnt":"", "Fcnt":2, "Err":""}, {"0":"5103", "1":"212029"}, {"0":"5103", "1":"211710"}]"$
    'JSON.Initialize(jsonstr)
    'Result=JSON.NextArray
    
    Result.Initialize
    Result.Add(CreateMap("0":"KA001", "1":"KA002", "Rcnt":2, "Fcnt":2, "Err":""))
    Result.Add(CreateMap("0":"5103", "1":"212029"))
    Result.Add(CreateMap("0":"5103", "1":"211710"))
    Return Result
End Sub

Sub Button1_Click
    Dim ListRs As List = GetList
    Dim TempRs As Map = ListRs.Get(1)
    If TempRs.IsInitialized = True Then
        Log(TempRs.Get("0"))
    Else
        Log("No Initialized")
    End If
End Sub
 

cxbs

Active Member
Licensed User
Longtime User
Second way is don't use ResumableSub.

B4X:
Private Sub GetList As List
    Dim Result As List
    'Dim JSON As JSONParser
    'Dim jsonstr As String
    ''jsonstr="[{""0"":""KA001"",""1"":""KA002"",""Rcnt"":2,""Fcnt"":2,""Err"":""""},{""0"":""5103"",""1"":""212029""},{""0"":""5103"",""1"":""211710""}]"
    'jsonstr = $"[{"0":"KA001", "1":"KA002", "Rcnt":"", "Fcnt":2, "Err":""}, {"0":"5103", "1":"212029"}, {"0":"5103", "1":"211710"}]"$
    'JSON.Initialize(jsonstr)
    'Result=JSON.NextArray
   
    Result.Initialize
    Result.Add(CreateMap("0":"KA001", "1":"KA002", "Rcnt":2, "Fcnt":2, "Err":""))
    Result.Add(CreateMap("0":"5103", "1":"212029"))
    Result.Add(CreateMap("0":"5103", "1":"211710"))
    Return Result
End Sub

Sub Button1_Click
    Dim ListRs As List = GetList
    Dim TempRs As Map = ListRs.Get(1)
    If TempRs.IsInitialized = True Then
        Log(TempRs.Get("0"))
    Else
        Log("No Initialized")
    End If
End Sub

Thank you for your reply. Resumablesub is used because the [wait for] statement is useful, otherwise the data will not be read and will be returned!

English comes from translation software
 

aeric

Expert
Licensed User
Longtime User
Thank you for your reply. Resumablesub is used because the [wait for] statement is useful, otherwise the data will not be read and will be returned!

English comes from translation software
I agree it may be a bug.
Yes, ResumableSub and Wait For is useful if you are connecting to a remote server (REST API) to get the data using OkHttpUtils2.
 

agraham

Expert
Licensed User
Longtime User
Always use the latest B4A. If you are not using v10.90 upgrade now - you should use a new SDK as well following the instructions exactly.

B4A – The simple way to develop native Android apps (b4x.com)

This looks like a bug that is already fixed but you won't know for sure until you are on the latest version. It is pointless reporting bugs on anything other than the current version.
 

cxbs

Active Member
Licensed User
Longtime User
Always use the latest B4A. If you are not using v10.90 upgrade now - you should use a new SDK as well following the instructions exactly.

B4A – The simple way to develop native Android apps (b4x.com)

This looks like a bug that is already fixed but you won't know for sure until you are on the latest version. It is pointless reporting bugs on anything other than the current version.

Did you test the above code and find that the information in the map can be displayed normally?
 

agraham

Expert
Licensed User
Longtime User
Did you test the above code and find that the information in the map can be displayed normally?
No, why should I? You reported a problem and I have told you what your next steps should be. If you are still using v9.80 then further discussion is useless until you are using the latest version.
 

cxbs

Active Member
Licensed User
Longtime User
No, why should I? You reported a problem and I have told you what your next steps should be. If you are still using v9.80 then further discussion is useless until you are using the latest version.


First of all, I would like to thank Mr. Erel for developing this easy-to-use software. In 2019, I purchased b4a software. When I upgraded from 9.8 to b4a 10.0, I found this problem. At that time, I also published this problem on the forum. This is the original connection

Now I want to upgrade b4a 10.9, but this problem still exists, so I don't know how to solve it. Is it because of my compiling environment?

The above English comes from translation software
 
Last edited:

cxbs

Active Member
Licensed User
Longtime User
This is indeed a bug in the debugger. Note that it will work properly if you set the variable like this:
B4X:
Dim TempRs As Map = ListRs.Get(1)
It will be fixed.

Dear Mr. Erel, thank you very much for your time to help check this problem!
 
Top