In b4ppc it is possible to create and refer to an object using control("...")
I want to create objects while the program runs, and give each new object a name and a number (which is not known in advance), like control("xxx" & i ,object type)
Thinking about network example with comparison to B4ppc example which had this:
What is the way to do it in B4A ?
I want to create objects while the program runs, and give each new object a name and a number (which is not known in advance), like control("xxx" & i ,object type)
Thinking about network example with comparison to B4ppc example which had this:
B4X:
Sub WaitForConnection_Tick ' used to collect all the clients
If Server.Pending = True Then
t = Now 'Used to distinguish between the objects names.
'For each client two objects are created, a Client object and a BinaryFile object.
AddObject("client" & t,"Client")
AddObject("bin" & t,"BinaryFile")
Control("client" & t,Client).New1
Control("client" & t,Client).Value = Server.Accept
Control("bin" & t,Binaryfile).New1(Control("client" & t,Client).GetStream,False)
AlClients.Add(t)
......
What is the way to do it in B4A ?
Last edited: