Android Question map type ( structure ) ?

Waldemar Lima

Well-Known Member
Licensed User
hello everyone !

can i manipulate a "Type" with a map or a list ?

like this :

B4X:
Sub Process_Globals
    Type MyType (Name As String, Items(10) As Int)' As Map
End Sub

Sub Activity_Create(FirstTime As Boolean)

    Activity.LoadLayout("Layout1")
    
       MyType.initialize
      MyType.Name.put("mymapitem","1234")

End Sub

have a way to do this ?
 

DonManfred

Expert
Licensed User
Longtime User
Mytype is not a MAP. It is a CustomType. You can only use their properties.
You defined name as as STRING and Items as an array of Int

B4X:
dim t as MyType
t.initialize
t.name = "Hans"
dim items(10) as int
items(0) = 1
items(2) = 2
t.Items = items
 
Upvote 0
Top