Although I assume the answer is "Yes", I am not absolutely sure.
The following source is correct, right?
I mean that the child Maps must also be created that way and they will be safe.
(srvr is a jServer server, of course).
---------------------------------------------------------------------------------------
A doubt that came to me while I was writing this post: if the mapMain has been declared as Public, must the children be as well or can/must they be declared as Private?
(I will verify this personally shortly, perhaps using "normal" Maps).
EDIT:
I did a test (not server and therefore not CreatetThreadSafeMap):
I have declared mapMain as Public in the B4XMainPage.
Then I declared, initialized and filled the child Maps in a private Sub of the B4XMainPage; I declared them using Private and not Dim, although it is the same thing there.
Well, the two child Maps (and their content) are accessible from a second B4XPage.
The following source is correct, right?
B4X:
Dim mapParent As Map
mapParent = srvr.CreateThreadSafeMap
Dim mapChild1 As Map
mapChild1 = srvr.CreateThreadSafeMap
Dim mapChild2 As Map
mapChild2 = srvr.CreateThreadSafeMap
mapParent.Put("Child1", mapChild1)
mapParent.Put("Child2", mapChild2)
(srvr is a jServer server, of course).
---------------------------------------------------------------------------------------
A doubt that came to me while I was writing this post: if the mapMain has been declared as Public, must the children be as well or can/must they be declared as Private?
(I will verify this personally shortly, perhaps using "normal" Maps).
EDIT:
I did a test (not server and therefore not CreatetThreadSafeMap):
I have declared mapMain as Public in the B4XMainPage.
Then I declared, initialized and filled the child Maps in a private Sub of the B4XMainPage; I declared them using Private and not Dim, although it is the same thing there.
Well, the two child Maps (and their content) are accessible from a second B4XPage.
Last edited: