F fasilosman Active Member Licensed User Longtime User Aug 29, 2014 #1 Can anyone help me to pass more than one parameter values from one activity to another activity. I used - CallSubDelayed2("activityname","SubName",value) it can pass one value, according to my knowledge. Please help me with a simple solution
Can anyone help me to pass more than one parameter values from one activity to another activity. I used - CallSubDelayed2("activityname","SubName",value) it can pass one value, according to my knowledge. Please help me with a simple solution
DonManfred Expert Licensed User Longtime User Aug 29, 2014 #2 Use a map which you pass to the other activity.... The map can contain more than one value.... Upvote 0
barx Well-Known Member Licensed User Longtime User Aug 29, 2014 #3 I believe CallSubDelayed3 allows more that 1 value. Failing that you could always try passing an array or list (no idea if it will work mind...) Upvote 0
I believe CallSubDelayed3 allows more that 1 value. Failing that you could always try passing an array or list (no idea if it will work mind...)
F fasilosman Active Member Licensed User Longtime User Aug 29, 2014 #4 DonManfred said: Use a map which you pass to the other activity.... The map can contain more than one value.... Click to expand... Can you please explain me via sample code please Upvote 0
DonManfred said: Use a map which you pass to the other activity.... The map can contain more than one value.... Click to expand... Can you please explain me via sample code please
DonManfred Expert Licensed User Longtime User Aug 29, 2014 #5 B4X: Dim m As Map m.Initialize m.Put("Keyname","Value") m.Put("Keyname2","Value2") m.Put("Keyname3","Value3") CallSubDelayed2("activityname","MySubName",m) and the sub should have this signature B4X: Sub MySubName(m As Map) For i = 0 To m.Size-1 Log(m.GetKeyAt(i)&"="&m.GetValueAt(i)) Next End Sub Last edited: Aug 29, 2014 Upvote 0
B4X: Dim m As Map m.Initialize m.Put("Keyname","Value") m.Put("Keyname2","Value2") m.Put("Keyname3","Value3") CallSubDelayed2("activityname","MySubName",m) and the sub should have this signature B4X: Sub MySubName(m As Map) For i = 0 To m.Size-1 Log(m.GetKeyAt(i)&"="&m.GetValueAt(i)) Next End Sub
F fasilosman Active Member Licensed User Longtime User Aug 29, 2014 #6 DonManfred said: B4X: Dim m As Map m.Initialize m.Put("Keyname","Value") m.Put("Keyname2","Value2") m.Put("Keyname3","Value3") CallSubDelayed2("activityname","MySubName",m) and the sub should have this signature B4X: Sub MySubName(m As Map) For i = 0 To m.Size-1 Log(m.GetKeyAt(0)&"="&m.GetValueAt(0)) Next End Sub Click to expand... Thank a lot Upvote 0
DonManfred said: B4X: Dim m As Map m.Initialize m.Put("Keyname","Value") m.Put("Keyname2","Value2") m.Put("Keyname3","Value3") CallSubDelayed2("activityname","MySubName",m) and the sub should have this signature B4X: Sub MySubName(m As Map) For i = 0 To m.Size-1 Log(m.GetKeyAt(0)&"="&m.GetValueAt(0)) Next End Sub Click to expand... Thank a lot